开发者

browsing caching of css and javascript files?

I want to konw whether the browser caching of css and javascript is automatic with php or v hv to do it manually with code..

and wt are the advantages if i manually cache t开发者_StackOverflow中文版he css and js files to client browser.. using code..

??

If not cache wt will happened ??


By default a browser won't cache CSS or JS file served via PHP or any other dynamic server-side language. The HTTP response headers generated by PHP will declare the file as last updated at the current date. In order to have clients cache the response, you have to manually implement a conditional GET.

Here's a guide. It's for RSS, but applies for any HTTP request. http://fishbowl.pastiche.org/2002/10/21/http_conditional_get_for_rss_hackers/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜