Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Cache Output HTML

by Anonymous Monk
on Nov 08, 2001 at 23:28 UTC ( #124144=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi.

What is the header that should go along with print "Content-type: text/html\n\n"; that will force the browser to cache the html outputted by a cgi script?

Thanks,
Ralph.

Comment on Cache Output HTML
Re: Cache Output HTML
by Asim (Hermit) on Nov 08, 2001 at 23:47 UTC

    As a rule, you can recommend, not force, a browser to cache, or not cache, a page. Most browsers will listen to the "Expires" Header:
    Expires: Fri, 30 Oct 1998 14:19:41 GMT
    And the more recent (HTTP 1.1) "Cache-Control" Header:
    Cache-Control: max-age=3600, must-revalidate
    To sort these things out. Check out How (and how not) to Control Caches for more on this.

    ----Asim, known to some as Woodrow.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://124144]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (15)
As of 2014-09-19 13:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (138 votes), past polls