登录 | 注册 | FAQ
Anonymous

embedded serverside socket communication issues

+ 发表回复

1 篇帖子 分页: 1 / 1


embedded serverside socket communication issues

dataguy » 周三 12月 13, 2017 12:52 pm

Hi - first post here.
I have an embedded website which controls some hardware. Communication is by use of a server socket which receives a page request with an additional piece of text, instigated by a button, which in turn allows the embedded processor to control the hardware. This all works as it should except. .. the browsers which access the server page remember the last additional piece of text in the url used to connect and the action is called again. So for a toggle function just refreshing the page causes the action, or if the setting has been changed by another user just logging on from a previous session can undo the change.

<html><head><style>h1 {text-align:center;}p {text-align:center;}</style></head><h1>Random Hardware Control</h1><p><a href=\"socket1\"><button style=width:60%;height:80px;background-color:";
page2="red;font-size:32px;font-weight:bold>Hardware is ON</button></a>&nbsp;</p></html>";

This page asks the server for another page url xxxxxxx/socket1, the server alters the hadware and dishes up the new page and now the browser remembers url xxxxxxx/socket1 . This then causes the action to repeat if the page is refreshed or the user logs on again :-(

Coding space is limited so inline html is best.
Any help much appreciated.

Best Regards

Dataguy
头像

dataguy

  • 帖子: 1
  • 注册: 周三 12月 13, 2017 12:31 pm


+ 发表回复

分页: 1 / 1