[wp-hackers] Let's make Buttonsnap fully obsolete

Andrew Ozz admin at laptoptips.ca
Wed Apr 2 10:35:31 GMT 2008

DD32 wrote:
> On Wed, 02 Apr 2008 20:58:37 +1100, Andrew Ozz <admin at laptoptips.ca> wrote:
>> Keeping it a .js file allows it to be cached in the browser and various
>> network caches, so after the first loading it is a lot faster.
> Theres no reason why a php file couldnt be cached correctly too.

It could, but it's a bit tricky. The web server sees everything coming 
from php as dynamic content, so it doesn't do any cache control on it.

All cache control has to be done from php, the headers Last-Modified 
/If-Modified-Since and Etag/If-None-Match have to be checked and set, 
etc. This works well on Apache, but not good on IIS or Litespeed, where 
php can't access the headers sent by the browser. Even getallheaders() 
was renamed to apache_request_headers() in php 4.3.0.

More information about the wp-hackers mailing list