HTTP Performance Tips - Add Expires or a Cache-Control Header
According to Yahoo HTTP best practices, adding an Expires or Cache-Control header helps to increase performance of web server. Ideally, the performance should increase as cached data are not request and transmitted over the next visit.
To archive that, you should
I am not going to post code here as there are many existing code out there. But, if you have no idea on what to search for, those links below will help
To archive that, you should
- For static components: implement "Never expire" policy by setting far future Expires header
- For dynamic components: use an appropriate Cache-Control header to help the browser with conditional requests. The value is 48 hours.
I am not going to post code here as there are many existing code out there. But, if you have no idea on what to search for, those links below will help
- I had tested this Expires Serlvet and it works.
- HTTP 1.1 Protocol Parameter
- HTTP 1.1 Header Fields Definition
Comments
Post a Comment