![]() |
![]() |
Home | Search | Contact |
| News | Services | Newsletter | Reference | About Us |
|
Home > Reference
> Articles
Top
10 tips for effective caching |
|
||
| 1. Use
consistent names for the same element (e.g. don't have the same graphic
or stylesheet in two directories). If you serve the same content on different
pages, to different users, or from different sites, it should use the same
URL. For example, if you use /index.html in your HTML as a reference once,
always use it that way. 2. Be economical with content elements. Can you replace two nearly identical elements, referred to from two different pages, by one common element - so that it only needs to be retrieved once for both pages. 3. Use a common library of images and refer back to them from different places. 4. For images and pages that don't change often specify a far-off Expires header. 5. If you want to track individual page grabs for your log statistics, then include a single uncacheable element in each page, something small and quick to deliver by the server. 6. Aim to set cache headers on nearly every element of your site and pay particular attention when using Content /Site Management tools. 7. Make caches recognize regularly updated pages by specifying an appropriate expiration time. Don't change files unnecessarily to prevent a falsely young Last-Modified date. For instance, when using FTP to update your site, don't copy over the entire site; just move the files that you've changed. 8. If a resource (especially a downloadable file) changes, then change its name and make it expire far into the future. The page that links to it is the only one that will need a short expiry time. 9. Encrypted pages are not stored by shared caches. Use images on SSL pages in moderation. 10. Cookies make page content difficult to cache. Limit cookies to dynamic pages.
|
||||
© SciVisum Limited 2008 - Web Application Testing - Tel 01227 768276 email SciVisum |