Using Perl in slashboxes in slashcode (how to force refresh)

C

Cyde Weys

Okay, I know this is kind of offtopic, but there really isn't a
slashcode newsgroup, so this is the closest I could come. I'm trying to
put a slashbox on my webpage that looks at the current system clock and
says stuff based on that (i.e., "It's 9:39pm, the Sun has just gone down",
or whatever). I know the Perl to do this; the problem is, the slashboxes
are only updated once in a while and then their output cached. I need to
force this Perl code to run every time the page is viewed and the slashbox
is displayed. Anyone know how to accomplish that? Thanks.
 
B

Bastian.Zacher

Okay, I know this is kind of offtopic, but there really
isn't a
slashcode newsgroup, so this is the closest I could come. I'm trying to
put a slashbox on my webpage that looks at the current system clock and
says stuff based on that (i.e., "It's 9:39pm, the Sun has just gone down",
or whatever). I know the Perl to do this; the problem is, the slashboxes
are only updated once in a while and then their output cached. I need to
force this Perl code to run every time the page is viewed and the slashbox
is displayed. Anyone know how to accomplish that? Thanks.
Cyde,

I assume this is not a perl problem, either the html has to configured not
to cache the site. There are some html-META-Tags to use:

<META HTTP-EQUIV="Cache-Control" content="no-cache">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Refresh" CONTENT="60">

The first tells the browser not to cache the site, the last will initiate
to
load the site every 60 seconds. Maybe also useful.

Refer html guides...

bastian
 
C

Cyde Weys

Thanks for the help, but I guess I didn't make the problem clear.
Slashcode itself is what caches the page, not the browser. To get a
slashbox to refresh its contents I have to restart the slashd process - not
very useful. I'm looking for a way to directly execute some Perl code on
each page view.
 
C

Cyde Weys

I need some sort of a way to directly execute code like how it's done in
the templates - but instead, in the slashbox. Anyone got an idea?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,160
Messages
2,570,889
Members
47,420
Latest member
ZitaVos505

Latest Threads

Top