Re: Prevent Loading from Cache in Internet Explorer

2005-06-19 Thread Dennis Kelly

Perhaps a little follow up wisdom.
Caching can happen anywhere between the origin server and the browser, 
so the browser specific solution might not meet all conditions.
RFC 2616 - Hypertext Transfer Protocol -- HTTP/1.1 
http://www.faqs.org/rfcs/rfc2616.html is very explicit about caching. 
Search the contents for the phrase "no-cache" for a strong discussion. 
(RFC's are frequently legible if you read with the right attitude.)


Bottom line from the RFC is that you put in a line which reads:

Cache-Control: no-cache

(mind the space) in the HTTP Header - Note that this is NOT the ... /HEAD> section of your html, but in the actual header of the file 
going back (the Reply header described in section 6 of the RFC). Among 
other things, that header declares things like "Content-Type". Perhaps 
the  statements described below were intended to be in 
front of the  statements. You are free to experiment, of 
course.


From my experience, when I put the Cache-Control directive in the 
stream, everybody behaved the way I wanted them to.


Microsoft's IIS at version 4 included a tab called "HTTP Headers" which 
permitted the addition of  a custom header whose name was 
"Cache-Control", and whose value was "no-cache". This was to accommodate 
folks who read RFC's and want to do things that Microsoft hadn't yet 
figured out a "more Microsoft" way to do.


Jerry Kassebaum wrote:


Thank you!

It wasn't easy, but the answer was there!

I'll give the full explanation if anyone wants it, but here is the 
short one. The CGI and JavaScript files were updating, but not the two 
*.js files with the chapter and verse! So I eliminated them and put 
the info in the JavaScript file.


The reason I want to use the CGI/Perl file is that there are about 600 
verses the program picks from, and I don't want to have to send all 
that to the player.


The working version is now http://biblescramble.com/ezo7.cgi.

THANK YOU SO MUCH! That was a tuff one!

#

You said:

This article discusses some no-cache bugs in IE and a workaround.
http://www.htmlgoodies.com/beyond/reference/article.php/3472881  And
since u
have the verse in a javascript file, what u really want is the
javascript
file to be reloaded, not just the html page.  I don't know if a browser
expects .js files to change with a page reload.

But looking at what ur trying to do, I don't know why ur trying to do it
this way.  The easy was is to just load all the verses and hints into
one
javascript array and have the play again button just pick a random
number in
that range and update the page elements.  U could do this with no perl
at
all. You're really making a DHTML app.






--


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Prevent Loading from Cache in Internet Explorer

2005-06-11 Thread Jerry Kassebaum

Thank you!

It wasn't easy, but the answer was there!

I'll give the full explanation if anyone wants it, but here is the short 
one. The CGI and JavaScript files were updating, but not the two *.js files 
with the chapter and verse! So I eliminated them and put the info in the 
JavaScript file.


The reason I want to use the CGI/Perl file is that there are about 600 
verses the program picks from, and I don't want to have to send all that to 
the player.


The working version is now http://biblescramble.com/ezo7.cgi.

THANK YOU SO MUCH! That was a tuff one!

#

You said:

This article discusses some no-cache bugs in IE and a workaround.
http://www.htmlgoodies.com/beyond/reference/article.php/3472881  And
since u
have the verse in a javascript file, what u really want is the
javascript
file to be reloaded, not just the html page.  I don't know if a browser
expects .js files to change with a page reload.

But looking at what ur trying to do, I don't know why ur trying to do it
this way.  The easy was is to just load all the verses and hints into
one
javascript array and have the play again button just pick a random
number in
that range and update the page elements.  U could do this with no perl
at
all. You're really making a DHTML app.






--


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Prevent Loading from Cache in Internet Explorer

2005-06-11 Thread Chris Wagner
This article discusses some no-cache bugs in IE and a workaround.
http://www.htmlgoodies.com/beyond/reference/article.php/3472881  And since u
have the verse in a javascript file, what u really want is the javascript
file to be reloaded, not just the html page.  I don't know if a browser
expects .js files to change with a page reload.

But looking at what ur trying to do, I don't know why ur trying to do it
this way.  The easy was is to just load all the verses and hints into one
javascript array and have the play again button just pick a random number in
that range and update the page elements.  U could do this with no perl at
all. You're really making a DHTML app.






--
REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=--
"...ne cede males"

0100

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Prevent Loading from Cache in Internet Explorer

2005-06-11 Thread Jerry Kassebaum

Thanks for your help, Aaron!

My code is not object oriented. The beginning lines are
#!/usr/bin/perl
use CGI ":standard";
srand();

The ending lines are:
print "Location: http://biblescramble.com/biblescramble6.html\n";;
print header;

I tried changing the ending lines to:

print "Location: http://biblescramble.com/biblescramble6.html\n";; #Same 
as above

print header(-type=>'text/html',
  -expires=>'-1d');  #Expire the content yesterday -

That didn't do it. It still loads the same verse over and over.

By the way, I added http://biblescramble.com/ezo6.cgi and 
http://biblescramble.com/biblescramble6.html which call each other, rather 
than using twice as many files and using a cycle, since that didn't work 
anyway.


Any help would be appreciated.

*

You wrote:

I think what he means is he wants to know how to set headers to disable 
caching.


#!/usr/bin/perl

use CGI;

my $q = new CGI();

print $q->header(-type=>'text/html',
-expires=>'-1d'); #Expire the content yesterday -
forces
browsers to refresh

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Steven Manross
Sent: June 10, 2005 12:38 PM
To: Jerry Kassebaum; perl-win32-users@listserv.ActiveState.com
Subject: RE: Prevent Loading from Cache in Internet Explorer

IE->Tools->Internet Options->Settings->Change the radio box to "Every
visit to the page"

Steven

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Jerry Kassebaum
Sent: Friday, June 10, 2005 8:38 AM
To: perl-win32-users@listserv.ActiveState.com
Subject: Prevent Loading from Cache in Internet Explorer


Sorry, but this is a repeat question.

Here's the question: How do I prevent Internet Explorer from loading
from
its cache?

Here's the problem: I have an online game, biblescramble.com/ezo1.cgi,
that
uses Perl to choose a random Bible verse from 600 or so, and then calls
a
JavaScript to play hangman with the verse. The JavaScript has the option
of
calling the Perl script to play another game.

This works fine in Firefox. But in Internet Explorer information is
saved in
a cache and the game is repeated.

The only solution I have is writing a duplicate of the Perl and
JavaScript
files, and having the first call the second and making a cycle. That's
how I
have it set up now, which is why there are two distinct verses. I really

don't want to write 10 of each script, or how ever many it would take to

overload the cache.

There must be a simple command to prevent this problem. Any command to
reload a page is not what I'm looking for, since Perl is loading a
JavaScript page and visa-versa. I need the command, "Get this from the
server only!"

In biblescramble.com/ezo1.cgi (notice the 1) the verse is written to a
text
file, and the reference is written to another, which the JavaScript
reads.
So there are three permanent files on the server: Perl, JavaScript, 600
verses; and two theat keep getting overwritten: random verse, reference.

In biblescramble.com/ezo4.cgi (notice the 4) I use the Perl script to
write
a new JavaScript with each use, and the JavaScript includes the verse
and
reference. So there are two permanent files, Perl and 600 verses, and
one
JavaScript files that keeps getting overwritten.


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Prevent Loading from Cache in Internet Explorer

2005-06-11 Thread Aaron Hawryluk
 
I think what he means is he wants to know how to set headers to disable
caching.

#!/usr/bin/perl

use CGI;

my $q = new CGI();

print $q->header(-type=>'text/html',
 -expires=>'-1d'); #Expire the content yesterday - forces
browsers to refresh

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Steven Manross
Sent: June 10, 2005 12:38 PM
To: Jerry Kassebaum; perl-win32-users@listserv.ActiveState.com
Subject: RE: Prevent Loading from Cache in Internet Explorer

IE->Tools->Internet Options->Settings->Change the radio box to "Every
visit to the page"

Steven

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Jerry Kassebaum
Sent: Friday, June 10, 2005 8:38 AM
To: perl-win32-users@listserv.ActiveState.com
Subject: Prevent Loading from Cache in Internet Explorer


Sorry, but this is a repeat question.

Here's the question: How do I prevent Internet Explorer from loading from
its cache?

Here's the problem: I have an online game, biblescramble.com/ezo1.cgi, that
uses Perl to choose a random Bible verse from 600 or so, and then calls a
JavaScript to play hangman with the verse. The JavaScript has the option of
calling the Perl script to play another game.

This works fine in Firefox. But in Internet Explorer information is saved in
a cache and the game is repeated.

The only solution I have is writing a duplicate of the Perl and JavaScript
files, and having the first call the second and making a cycle. That's how I
have it set up now, which is why there are two distinct verses. I really

don't want to write 10 of each script, or how ever many it would take to

overload the cache.

There must be a simple command to prevent this problem. Any command to
reload a page is not what I'm looking for, since Perl is loading a
JavaScript page and visa-versa. I need the command, "Get this from the
server only!"

In biblescramble.com/ezo1.cgi (notice the 1) the verse is written to a text
file, and the reference is written to another, which the JavaScript reads. 
So there are three permanent files on the server: Perl, JavaScript, 600
verses; and two theat keep getting overwritten: random verse, reference.

In biblescramble.com/ezo4.cgi (notice the 4) I use the Perl script to write
a new JavaScript with each use, and the JavaScript includes the verse and
reference. So there are two permanent files, Perl and 600 verses, and one
JavaScript files that keeps getting overwritten.


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Prevent Loading from Cache in Internet Explorer

2005-06-10 Thread Steven Manross
IE->Tools->Internet Options->Settings->Change the radio box to "Every
visit to the page"

Steven

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Jerry Kassebaum
Sent: Friday, June 10, 2005 8:38 AM
To: perl-win32-users@listserv.ActiveState.com
Subject: Prevent Loading from Cache in Internet Explorer


Sorry, but this is a repeat question.

Here's the question: How do I prevent Internet Explorer from loading
from 
its cache?

Here's the problem: I have an online game, biblescramble.com/ezo1.cgi,
that 
uses Perl to choose a random Bible verse from 600 or so, and then calls
a 
JavaScript to play hangman with the verse. The JavaScript has the option
of 
calling the Perl script to play another game.

This works fine in Firefox. But in Internet Explorer information is
saved in 
a cache and the game is repeated.

The only solution I have is writing a duplicate of the Perl and
JavaScript 
files, and having the first call the second and making a cycle. That's
how I 
have it set up now, which is why there are two distinct verses. I really

don't want to write 10 of each script, or how ever many it would take to

overload the cache.

There must be a simple command to prevent this problem. Any command to 
reload a page is not what I'm looking for, since Perl is loading a 
JavaScript page and visa-versa. I need the command, "Get this from the 
server only!"

In biblescramble.com/ezo1.cgi (notice the 1) the verse is written to a
text 
file, and the reference is written to another, which the JavaScript
reads. 
So there are three permanent files on the server: Perl, JavaScript, 600 
verses; and two theat keep getting overwritten: random verse, reference.

In biblescramble.com/ezo4.cgi (notice the 4) I use the Perl script to
write 
a new JavaScript with each use, and the JavaScript includes the verse
and 
reference. So there are two permanent files, Perl and 600 verses, and
one 
JavaScript files that keeps getting overwritten.


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Prevent Loading from Cache in Internet Explorer

2005-06-10 Thread Jerry Kassebaum

Sorry, but this is a repeat question.

Here's the question: How do I prevent Internet Explorer from loading from 
its cache?


Here's the problem: I have an online game, biblescramble.com/ezo1.cgi,  that 
uses Perl to choose a random Bible verse from 600 or so, and then calls a 
JavaScript to play hangman with the verse. The JavaScript has the option of 
calling the Perl script to play another game.


This works fine in Firefox. But in Internet Explorer information is saved in 
a cache and the game is repeated.


The only solution I have is writing a duplicate of the Perl and JavaScript 
files, and having the first call the second and making a cycle. That's how I 
have it set up now, which is why there are two distinct verses. I really 
don't want to write 10 of each script, or how ever many it would take to 
overload the cache.


There must be a simple command to prevent this problem. Any command to 
reload a page is not what I'm looking for, since Perl is loading a 
JavaScript page and visa-versa. I need the command, "Get this from the 
server only!"


In biblescramble.com/ezo1.cgi (notice the 1) the verse is written to a text 
file, and the reference is written to another, which the JavaScript reads. 
So there are three permanent files on the server: Perl, JavaScript, 600 
verses; and two theat keep getting overwritten: random verse, reference.


In biblescramble.com/ezo4.cgi (notice the 4) I use the Perl script to write 
a new JavaScript with each use, and the JavaScript includes the verse and 
reference. So there are two permanent files, Perl and 600 verses, and one 
JavaScript files that keeps getting overwritten.



___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs