Login | Register | FAQ

embedded serverside socket communication issues

+ Post a reply

1 post Page 1 of 1

embedded serverside socket communication issues

by dataguy » Wed Dec 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

User avatar


  • Posts: 1
  • Joined: Wed Dec 13, 2017 12:31 pm

+ Post a reply

Page 1 of 1