# Does Internet explorer caches style sheets & images by default; if yes how long?



## sh100 (Mar 3, 2008)

Does style sheet is requested on every request(each page visit) on a site. Or is style sheet for that site is cached when first page is requested & then for consequent visits the cached style sheet is used? 

What about images; say I have some images on header & footer which is visible on every page of my site? Does these images are cached & used again depending on http request parameter last-modified or are requested for each page again & again?


----------



## Sc0tt (Aug 15, 2007)

*Re: Does Internet explorer caches style sheets & images by default; if yes how long?*

First of all it depends on the viewers settings. If they have caching allowed (most do) then the cached files will stay on the persons computer until either it is deleted by the user or the cache limit is reached and other visited pages start to overwrite the other data.

If the css file is the same and requested from the same location on each page then it will read from the cache (if available) instead of loading it again. One of the reasons for style sheets is to save on server space and bandwidth due to the css file normally being cached (again depending on the user).

Images and most other page objects are also cached (if allowed). The image/file will then be loaded from cache across the site aslong as its the same name and location. 

IE as with most browsers, do cache by defualt but as I think ive said a few times.. it all depends on the settings the person is using. :grin:


----------



## sobeit (Nov 11, 2007)

*Re: Does Internet explorer caches style sheets & images by default; if yes how long?*

the webmaster can have some control over cache through the use of no-cache meta tags


.


----------



## Sc0tt (Aug 15, 2007)

*Re: Does Internet explorer caches style sheets & images by default; if yes how long?*

Yes, you can also set the meta tags to "no-cache" to force the browser to load from the server for every request on that page or "private" to make it only cache on that individuals browser or "public" to cache anywhere including other servers like proxies.


----------

