Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

IE cgi caching

by Anonymous Monk
on Aug 15, 2005 at 19:23 UTC ( [id://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?

Replies are listed 'Best First'.
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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-03-29 09:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found