FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Is there a way to distinguish an auto-refresh from a manual page load?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Is there a way to distinguish an auto-refresh from a manual page load? [message #177195 is a reply to message #177194] Sun, 26 February 2012 18:40 Go to previous messageGo to previous message
J.O. Aho is currently offline  J.O. Aho
Messages: 194
Registered: September 2010
Karma:
Senior Member
crankypuss wrote:
> On 02/26/2012 05:25 AM, The Natural Philosopher wrote:

>> It occurs to me if I do refresh under Javashite I can always hand set a
>> variable to say 'ignore the post variables, if they happen to be set'
>>
>> BUT I have to say I am attracted to playing with web sockets sim0ply
>> because its new and a bit of a challenge. That avoids the need to
>> refresh the page ...at all.
>
> I've never been successful in digging around to find out how the few web pages
> I've seen are able to update the page without constant flickering and so on,
> it's my impression (*not* understanding, I lack that) that http is a
> client/server protocol and that once a request has been fulfilled the
> transaction is over. I'm curious, but not compelled.

Ajax runs in the "background", making a request in intervals and update the
correct section of the page when there is something to update, a simple way to
see this is to use something like firebug and see what connections are made
after the page has been loaded.



> On the other hand I have been somewhat successful in creating the same
> appearance by using closely spaced refreshes, most browsers seem not to clear
> the screen prior to rendering so if the next is mostly the same as the last it
> appears to have been partially updated.
>
> I'm not sure what you mean by "web sockets", I've used the kind of sockets
> provided by PHP but if you mean something else I've no clue what that might be.

Web sockets has been introduced with html 5 (and there are a few diffe3rent
standards too), which allows the server to push content to the browser instead
of using ajax which pulls information from the server.

--

//Aho
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: simplexml adding 'encoding' attribute to xml declaration
Next Topic: strtotime() not able to handle 04/29 correctly???
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 05:32:27 GMT 2024

Total time taken to generate the page: 0.03930 seconds