Dudeman
08-19-2002, 08:18 AM
I'm having some serious problems getting Opera not to cache a javascript file. I have this code on a page:
<SCRIPT LANGUAGE="JavaScript" SRC="http://192.168.0.101/code.js">
</SCRIPT>
code.js is dynamically generated, but Opera refuses to fetch it more than once in any session even with a Shift-Reload.
Here's the header the server is returning with code.js:
HTTP/1.1 200 OK
Date: Mon, 19 Aug 2002 03:19:42 EST
Pragma: no-cache
Cache-control: no-cache
Expires: Sun, 18 Aug 2002 03:19:42 EST
Cache-control: max-age=0, public, must-revalidate
Content-Type: application/x-javascript
The code returned by code.js does some minor processing and sets a cookie. So I would expect that, even though Opera caches the code it should at least execute it each time. However, every time I reload the page there is no cookie even though the previous execution of the code should have set a cookie.
This all works correctly in IE and Netscape. Anyone have any ideas what may be causing either of these problems?
<SCRIPT LANGUAGE="JavaScript" SRC="http://192.168.0.101/code.js">
</SCRIPT>
code.js is dynamically generated, but Opera refuses to fetch it more than once in any session even with a Shift-Reload.
Here's the header the server is returning with code.js:
HTTP/1.1 200 OK
Date: Mon, 19 Aug 2002 03:19:42 EST
Pragma: no-cache
Cache-control: no-cache
Expires: Sun, 18 Aug 2002 03:19:42 EST
Cache-control: max-age=0, public, must-revalidate
Content-Type: application/x-javascript
The code returned by code.js does some minor processing and sets a cookie. So I would expect that, even though Opera caches the code it should at least execute it each time. However, every time I reload the page there is no cookie even though the previous execution of the code should have set a cookie.
This all works correctly in IE and Netscape. Anyone have any ideas what may be causing either of these problems?