[dancer-users] Refresh a Route periodically

Pedro Melo melo at simplicidade.org
Wed Jul 3 09:17:34 BST 2013


Hi,

On Tue, Jul 2, 2013 at 10:56 PM, Anand Meher <kvmsanand at gmail.com> wrote:

> Dear Perl Dancer Experts,
>                                        I am new to perl dancer. Thank you
> for the dancer framework. I could ramp-up quickly w.r.t using dancer
> framework to develop simple web-pages.
>
> I am trying to develop a webpage where I would like to have contents of a
> webpage refreshed (say after every x seconds).
>

Maybe I'm misunderstanding but why do you need server side support for this?

The basic way of doing this is to add a <meta> tag to your HTML like this:

<meta http-equiv="refresh" content="60;url=URL_OF_YOUR_PAGE_GOES_HERE" />

The 60 above is the number of seconds until refresh. Replace it with the
proper place.

An alternative solution is a bit of Javascript that sets a timer and forces
the refresh when it expires. You can even just refresh the parts of the
page you need, with an AJAX request.

Maybe I misunderstood what you want to do, but I see no reason to do this
server side on your explanation.

Bye.
-- 
Pedro Melo
@pedromelo
http://www.simplicidade.org/
xmpp:melo at simplicidade.org
mailto:melo at simplicidade.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20130703/b4dd0e00/attachment.htm>


More information about the dancer-users mailing list