[wp-hackers] Javascript Caching
Ryan Scheuermann
ryan at concept64.com
Wed Jun 7 19:47:03 GMT 2006
Michael,
I've witnessed this behavior also. Under Firefox, you can check the
Expires date of your cache by typing this into your browser window:
"about: cache". This is what I see for list-manipulation.js.php:
* Last modified:* 2006-06-07 15:42:24
* Expires:* 1969-12-31 19:00:00
Cache-Control and Expires headers should be added to that file to enable browser caching properly.
Ryan Scheuermann
----
Concept 64, Inc. | Phone: 610.349.0703 | Web: www.concept64.com
Michael D Adams wrote:
> It seems that WordPress' PHP based javascript
> (list-manipulation-js.php, cat-js.php, etc.) do not get cached by my
> browser [1]. I have confirmed this by tailing my server's logs and by
> watching the transactions with LiveHTTPHeaders [2].
>
> Does anyone else see similar behavior?
>
> Perhaps we should add to these files something like the following.
>
> header('Cache-control: max-age=2600000, must-revalidate', true); //
> ~1 month
> header('ETag: ' . $_GET['ver'], true);
>
> My knowledge of HTTP headers and browser/proxy caching is poor, however.
>
> Michael
>
> [1] Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.4)
> Gecko/20060508 Firefox/1.5.0.4
> [2] http://livehttpheaders.mozdev.org/
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
>
>
More information about the wp-hackers
mailing list