Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

IE cgi caching

by Anonymous Monk
on Aug 15, 2005 at 19:23 UTC ( #483958=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to prevent IE from caching my CGI program. Right now I'm using the standard methods in CGI. I've tried the following:
print header(-expires=>'-1d');
and
<META http-equiv="Expires" content=" Thu, 25 Jul 2002 08:12:13 GMT">
and
<META http-equiv="Pragma" content="no-cache">
Can anyone help?

Comment on IE cgi caching
Select or Download Code
Re: IE cgi caching
by !1 (Hermit) on Aug 15, 2005 at 19:32 UTC
    This will probably help.
Re: IE cgi caching
by gryphon (Abbot) on Aug 16, 2005 at 02:10 UTC

    Greetings Anonymous Monk,

    What !1 referenced looks very cool and is a much better option than my idea, but for completeness: What has worked for me in the past is to specify some throw-away query parameter that is always changing. For example:

    my $url = 'yourscript.cgi?data=realdata&ignore=' . time . rand # Then feed $url to links in refering pages

    Every time you click a link from a refering page (which itself has to be a script because it generates the random URL), you get a new unique URL for which IE has no cache. Just ignore the ignore parameter. It's hokey; it's stupid; it's a hack, but it has the value of working.

    gryphon
    Whitepages.com Development Manager (DSMS)
    code('Perl') || die;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2014-09-18 12:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (114 votes), past polls