Re: newbie question about print header

2006-03-08 Thread Bill Stephenson

From the CGI.pm docs...

Most browsers will not cache the output from CGI scripts. Every time 
the browser reloads the page, the script is invoked anew. You can 
change this behavior with the -expires parameter. When you specify an 
absolute or relative expiration interval with this parameter, some 
browsers and proxy servers will cache the script's output until the 
indicated expiration date. The following forms are all valid for the 
-expires field:


+30s  30 seconds from now
+10m  ten minutes from now
+1h   one hour from now
-1d   yesterday (i.e. "ASAP!")
now   immediately
+3M   in three months
+10y  in ten years time
Thursday, 25-Apr-1999 00:40:33 GMT  at the indicated time & date

So, you'd want this...


print $Q->header(-expires=>'-1d');


Kindest Regards,

--
Bill Stephenson


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




newbie question about print header

2006-03-08 Thread Mary Anderson

I want to know how to tell my application not to cache.

Kevin Meltzer's book and Lincoln Stein's book neatly drop that ball between
them.

Can I use the cgi.pm header routine and hand it a variable?

   print header (-no-cache=> 1) ..

there are several variants of this --- using -nph->1 

its pretty confusing.  I am not putting the straight CGI into my file and
these guys are giving me bits and pieces of the two ways to do it.

Thanks
Mary Anderson

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]