The page I am working on has a javascript function executed to print parts of the page. For some reason, printing in Safari, causes the window to somehow update. I say somehow, because it does not really refresh as in reload the page, but rather it starts the "rendering" of the page from start, i.e. scroll to top, flash animations start from 0, and so forth. The effect is reproduced by this fiddle: http://jsfiddle.net/fYmnB/ Clicking the print button and finishing or cancelling a print in Safari causes the screen to "go white" for a sec, which in my real website manifests itself as something "like" a reload. While running print button with, let's say, Firefox, just opens and closes the print dialogue without affecting the fiddle page in any way. Is there something with my way of calling the browsers print method that causes this, or how can it be explained - and preferably, avoided? P.S.: On my real site the same occurs with Chrome. In the ex
That tech is known as "comet", but also as "server push", "reverse ajax", etc.
ReplyDeleteIt's about pushing data from the server to the browser, keeping an http connection alive. Find more info on it on the wikipedia article (English version).
Also here's a pretty good presentation with Joe Walker from DWR, where he talks about comet.
As you rightfully pointed out, HTTP requires data to be 'pulled' by the client. Gmail can still 'pull' data from the server by using a timer to trigger the HTTP operation instead of requiring the user to click something. So, it may seem to be auto, but it is still client initiated.
ReplyDeleteYep Comets is correct. Google Web Toolkit Applications by Ryan Dewsbury explains how to create a Comets based Instant Messenger application in chapter 9.
ReplyDelete