[pmwiki-users] Automatic reloading of modified page

Waylan Limberg waylan at gmail.com
Wed Jan 18 11:54:12 CST 2006


On 1/18/06, christian.ridderstrom at gmail.com
<christian.ridderstrom at gmail.com> wrote:
> On Wed, 18 Jan 2006, Mikael Nilsson wrote:
>
> > Better to use a firefox extension such as
> > http://reloadevery.mozdev.org/
>
> I you mean something that you enable which reloads the page every 'x'
> seconds, it is standard in Opera and I've used that. Unfortunately it can
> be a bit annoying.. you don't want the reloading to often, and not to
> selldom. So it would be nice if the reload could be triggered somehow.
>
> When editing pages from Emacs/pmwiki-mode, I can have Emacs send a command
> to the browser which makes it reload the page. This can easily be made
> to happen each time a page is saved if you'd like that. I'm hoping
> something similar is possible for when you click 'Save and edit'.
>
Well, its not really possible to have the server initiate contact with
the client. So, anything you do would have to communicate between the
two browser windows on your local machine (the same way emacs works).
I suppose this wouldn't be to hard to do in FireFox - especially if
you are using 2 tabs in the same browser window. But then again, a
browser extension may be a little much for this. Don't know if a
bookmarklet would accomplish the same thing.

Another option would be to have some autorefresh code in JavaScript,
but have it do an Ajax request to check with the server whether the
page has been changed before reloading, or something like that. Again,
it has to be initiated on the client side - not from the server. Then
you also need the server code to respond to the Ajax request -
probably more work than it is worth.

Either way try Googling for "javscript autorefresh" or some such and
you should find plenty if code examples to get you started.
> /Christian
>
> > /Mikael
> >
> > ons 2006-01-18 klockan 13:06 +0100 skrev
> > christian.ridderstrom at gmail.com:
> > > Hi
> > >
> > > Here's an idea I just had... would it be possible to make a page reload
> > > automatically through some Java script? This is the scenario:
> > >
> > > Someone is editing a page extensively and frequently wants to see what it
> > > looks like. One solution is to use the preview functionality. Another
> > > solution is to pop up a second window showing the same page and instead of
> > > 'preview' use 'Save and Edit'. Then you reload the second window to see
> > > what's changed.
> > >
> > > My question is now if it's somehow possible to get the second window to
> > > automatically reload itself when the page is changed?  I'm guessing
> > > standard HTML won't suffice here, but maybe some Javascripting could do
> > > this?
> > >
> > > Hmm... or can you send a reload-command to another page?
> > >
> > > /Christian
> > >
> >
>
> --
> Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr
>
>
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://host.pmichaud.com/mailman/listinfo/pmwiki-users
>


--
----
Waylan Limberg
waylan at gmail.com




More information about the pmwiki-users mailing list