Browser caching problem OR mysql/perl code?

2001-12-12 Thread Jack A. Fobel

Hello,

Coming from an ASP world, I'm trying to learn how to break the browser from
caching. I am using variables and their values in the querystring to  update
a mysql database with perl. I am also re-querying the database to pull back
the record. I was hoping to pull back the updated record but it appears to
either cache the info in the browser and/or mysql is caching the query;
dunno.

I have tried a few things, they are 1) turn off cache in IE, 2) pass a
datestamp through the querystring, 3) HTML cache buster code. Being none of
these worked, I am resorting to believe it is the queries I am using in
perl.

Any ideas how I can write my queries in a select so that it is sure to pick
up any recently changed data from the database that might have just been
written?

Thanks,


 - Jack

p.s. please cc: to [EMAIL PROTECTED]



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Browser caching problem OR mysql/perl code?

2001-12-12 Thread Gordan Bobic

On Thursday 13 Dec 2001 03:42, Jack A. Fobel wrote:
 Hello,

 Coming from an ASP world, I'm trying to learn how to break the browser from
 caching. I am using variables and their values in the querystring to 
 update a mysql database with perl. I am also re-querying the database to
 pull back the record. I was hoping to pull back the updated record but it
 appears to either cache the info in the browser and/or mysql is caching the
 query; dunno.

I use perl/mysql quite extensively, and I have never run into anything like 
the second possibility you are describing. AFAIK, the only way that could 
happen is if you use INSERT DELAYED queries, and they don't finish running 
before your next refresh happens.

There are, however, bugs in IE that make it not requery, and when it doesn, 
it doesn't do it properly, thus possibly resulting in stale data. IIRC, squid 
has a workaround kludge for this behaviour.

 I have tried a few things, they are 1) turn off cache in IE, 2) pass a
 datestamp through the querystring, 3) HTML cache buster code. Being none of
 these worked, I am resorting to believe it is the queries I am using in
 perl.

Try sending back the last modified time in the headers that is always the 
current timestamp. You may also want to play with the Pragma: http header.

If you use the standard CGI modules in perl, you shouldn't really be having 
any of those problems, though. Try a few different browsers (including 
versions) - that should help you pinpoint the problem.

 Any ideas how I can write my queries in a select so that it is sure to
 pick up any recently changed data from the database that might have just
 been written?

It sounds like you have a browser problem.

Regards.

Gordan

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php