I have an image on my site which is rather big (about 200kb). I have no plans to change it in near future. How can I tell browsers to cache it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Setting correct headers helps you a lot.
Expires: Thu, 15 Apr 2012 20:00:00 GMT
Setting this header tells the browser when to refresh this resource. See http://www.web-caching.com/mnot_tutorial/how.html for more information.
ETag: “10c24bc-4ab-457e1c1f”
The ETag is sent to the server, on second visit. If it still has the same, it sends a 304 – not modified.
See http://developer.yahoo.com/performance/rules.html for more information, Chapter Configure ETags