![]() |
|
| Forcing Pages to Refresh |
| Web browsers "cache" pages people visit
(store copies on a local hard drive) to help speed up browsing. In some cases, as when
you're putting frequent News updates on a page, for instance, users may never see the new
information because their browser always uses the cached version (and most people don't
think to hit reload on a regular basis). If you've got a page that changes frequently and want to make sure that people are viewing the most recent copy (rather than an old version that's sitting somewhere on their hard drive), you need to tell their browser not to use that cached version. To do this, simply add the following line to the HTML after the <html> and <head> tags: <meta http-equiv="Pragma" content="no-cache">
Note that this won't take effect until the next time a page is reloaded in a browser. Important! Avoid adding this line to pages unless it's absolutely necessary. It is unpleasant for people with slow network connections to find that every time they visit your page, it takes a very long time to load, even though there are no substantial changes. Limit yourself to using it on pages with very time-sensitive information that changes once a week or more. Also, if you must use it, try to make the page as fast-loading as possible by minimizing the number of images on it. |
|||