For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > November 2006 > Forms Caching in FireFox?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Forms Caching in FireFox?
Richard Bagshaw

2006-11-25, 6:55 pm

Hi Peeps,

This isn't directly CGI / perl, however I am currently working on a CGI
project and I have stumbled across something that I just cannot seem to
fathom. Basically I have written a perl script that displays some drop
down boxes on a page, each time the page loads the information is read
from the database and the drop downs are automatically set to the
correct values each time, however .. in firefox if I do a normal
refresh, the information is read from the database correctly, but the
html cached someplace? So basically, I took the following code, just as
HTML code and once again it cached even this simple code, when I change
the selected option in the source code (html) it doesn't reflect in the
browser unless I do CTRL-F5. Im sure this is simple, but seeing as it
works fine in IE, and Safari I wondered if anyone else had stumbled
across this before?

<html>
<head>
<META HTTP-EQUIV=3D"CACHE-CONTROL" CONTENT=3D"NO-CACHE">
<META HTTP-EQUIV=3D"PRAGMA" CONTENT=3D"NO-CACHE">
<meta http-equiv=3D"expires" content=3D"0">
<meta http-equiv=3D"refresh" content=3D"60">
<title>Test HTML</title>
</head>
<body>
<form name=3D"myform1" action=3D"blah.pl" method=3D"post">
<select name=3D"newpriority" onChange=3D"this.form.submit()"
size=3D"1">
<option value=3D"low">low</option>
<option selected value=3D"standard">standard</option>
<option value=3D"high">high</option>
</select>
</form>
</body>
</html>

Thanks,

Richard

WCJ d/b/a http://ccsh.us/

2006-11-28, 6:55 pm

On 11/25/06, Richard Bagshaw <richard@bagshaw.co.uk> wrote:

> <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
> <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">


HTML "head" isn't the same as setting an HTTP head;
Try Googling setting the Pragma: no-cache http header directly.
--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com