[pmwiki-users] Automatic reloading of modified page
waylan at gmail.com
Tue Jan 24 10:07:37 CST 2006
On 1/24/06, christian.ridderstrom at gmail.com
<christian.ridderstrom at gmail.com> wrote:
> On Wed, 18 Jan 2006, Waylan Limberg wrote:
> > Well, its not really possible to have the server initiate contact with
> > the client.
> Ok (a pity though).
Actually, this is a security concern. Perhaps on your own server you
wouldn't mind, but on some arbitrary site that you may be visiting for
the first time, I doubt you would want them to be able to do anything
of the sort.
> So basically an automatically reloading window will have to poll the
> server once a second or so, checking the modification time of the page.
> When the server reports a later modification time than that of the current
> page, it reloads the page...
> I've sometimes edited a page while talking with someone on the phone who
> looks at the page. In this case it'd be great if the page would reload
> automatically when I make a change (instead of me having to ask him to
> reload it all the time).
> But what if this feature was to become widely used, and people had the
> automatic reloading activated by default... What is the risk that
> something like this swamps a server with requests?
This is a small concern, especially if a large number of people are
viewing the page at the same time. In addition most people would find
a constantly reloading page that they are trying to read very
> >... Ajax request ...
> I don't really know Ajax, but do we really need it when all we need to do
I suppose using the term "Ajax" was unnecessary. However, the script
would have similar behavior in that it would first make a request to
the server for the modification time, wait for the responce, check the
returned time against the current time and then if the page has been
updated, make another request for the new page.
In essence, your trying to get a web interface (one way communication)
to work much like a desktop interface (two way), which is not so easy.
"Ajax" and its derivatives are the closest you will get to that type
of behavior today.
> > Either way try Googling for "javscript autorefresh" or some such and you
> > should find plenty if code examples to get you started.
> I'll let this rest for now.
> I would however like to know if the idea is sound, and if I should add it
> to PITS?
> Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
waylan at gmail.com
More information about the pmwiki-users