[thelist] Caching of external javascripts

Jim Dabell jim-lists.evolt.org at jimdabell.com
Wed Nov 13 16:29:00 CST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Sunday 10 November 2002 12:01 pm, Tony Light wrote:
> --
> [ Picked text/plain from multipart/alternative ]
> Hi, I'm looking for a word of advice from all you Opera buffs out there
> (though the problem may well affect other browsers that I have not yet
> tested).
>
> If we include an external javascript in an ordinary html page (i.e. using
> <script src="blah.js"></script>) then IE 5+ and Netscape 6 appear not to
> cache that script, while Opera 5+ does cache it.
>
> Normally I guess this is no problem.  However if that script is itself
> being dynamically generated to deliver some sort of dynamic content, you
> do have a problem. Refreshing the page will reflect (in IE and Netscape)
> any change just made to the script. In Opera, refresh all you like - no
> change.
>
> I've tried zapping all of Opera's caching parameters - so on the face of
> it nothing at all should be cached.  It persists in caching these pesky
> external scripts.  Of course, closing Opera and reopening it will then
> get you a refresh  - but that is not ideal!

The caching of objects through http is controlled with http headers.
Usually php/asp/etc automatically set these to prevent caching.  Check the
http headers returned when you request these files.

- --
Jim Dabell


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE90s0h3tJNldoQhi8RAlnSAJ9GggiAzCudN/uWFPQ4gBFp3n3i2ACfTBrt
gtdjO/WkRatSy9ODYfDFoTM=
=1xuY
-----END PGP SIGNATURE-----




More information about the thelist mailing list