[pmwiki-users] Automatic reloading of modified page

christian.ridderstrom at gmail.com christian.ridderstrom at gmail.com
Tue Jan 24 07:40:50 CST 2006


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).

> Another option would be to have some autorefresh code in JavaScript,

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?

>... Ajax request ...

I don't really know Ajax, but do we really need it when all we need to do
is get a javascript to check the modification time of a page?

> Either way try Googling for "javscript autorefresh" or some such and you
> should find plenty if code examples to get you started.

Googling for 'javascript autorefresh' does give me lots of results. 
However, since I don't have the time for learning javascript at the moment 
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

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr






More information about the pmwiki-users mailing list