Some of us wants to enable cache for pages to improve performane so that if any user comes again on the site then static part of web should not load from server, it will really improves the performane of your site.
I am writing here some of the ways to enable cache and dont send request to server for static data:
Header("Cache-Control: max-age=3600")this way your cache will expire after specified time in max-age parameter.This is HTTP/1.1 standard.
Header("Expires: Tue, 15 May 2007 07:19:00 GMT")Same as above but this is HTTP/1.0 standard.
Header("Last-modified : Mon, 01 Sep 1997 01:03:33 GMT")when you use caching be sure that when you update your images or css they should be updated to user side also, because users browser can display old page because of cache to prevent this use this tag to tell browser that page is updated and use new and fetch from server instead of using cache.
The other method for doing this is fingerprinting technique , in this what we can do is in the url of css file just add a number to identify when it is updated when this no changes url becomes new for browser and then it downloads new css file from server.see the example below:http://www.yoursite.com/css/style.css?v=676378
i think last one is a good and best way to use , when i will get any new will update this post.
I couldn
can u describe the problem and which way u r using.