Cache css/js from PHP processor

Nadir

New Member
I've built a php processor to process all my css and js files.The .htaccess rewrites the css and js files to point to the processor.The processor gets the contents of the css/js file, processes it and then outputs to the browser.For some reason the css and js files refuse to cache?I've set the "Expires" and "Cache-Control" headers, but still no luck.Any suggestions?ThankseditHere's some of the code:\[code\]function setExpires($expires) { header('Expires: '.gmdate('D, d M Y H:i:s', time()+$expires).' GMT'); header("Cache-Control: max-age=$expires, public"); header("Connection: close");}\[/code\]I'm using Google Chrome dev tools. The headers coming back are this:\[code\]Request URL:http://www.static.do-u-know.net/css/common.1286502074.cssRequest Method:GETStatus Code:200 OKRequest HeadersAccept:text/css,*/*;q=0.1Cache-Control:max-age=0Referer:http://www.do-u-know.net/frame.phpUser-Agent:Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3Response HeadersCache-Control:max-age=631138519, publicConnection:closeContent-Encoding:gzipContent-Type:text/cssDate:Fri, 08 Oct 2010 02:41:12 GMTExpires:Mon, 07 Oct 2030 22:56:31 GMTServer:Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635Transfer-Encoding:chunkedVary:Accept-EncodingX-Powered-By:PHP/5.2.5\[/code\]
 
Back
Top