Mobile web pages - & gt; Server - & gt; Insecticidal lamp - & gt; Server - & gt; Mobile web page, I'm stuck in the last step: server - & gt; Mobile web site, because the mobile IP is dynamic, and cannot remember IP way,
CodePudding user response:
The understanding of the communication process is not very accurate,Access to the WEB server, a complete communication process is: the browser - Request - & gt; A web server - the Response - & gt; Browser (no Response is not can't, just in general, as a Response, have the effect of a feedback),
And rarely appear a web server to the client (browser) actively to push the scene (to do also can, websocket),
If encounter this kind of situation, a request, feedback for many times, can use multipart/x - mixed - replace message last response, may also directly bring a websocket, but you do not need such scene, just one of the most basic web server response process, do not need to know the client's IP,
Phone/PC - request - & gt; Web server - performing background logic (control lamp, write database) - & gt; Response in response to phone, ok,
CodePudding user response:
There is also a forgot to say, the browser regularly polling can do take the information to the server, such as write a timing in js, every 3 seconds with ajax sends a request to the server