Caching js and images on client

S

Smokey Grindle

is there a way to cache only Javascript and images on the client? it seems
that we are spending most of our time pushing out images and java scripts,
but these never change! so whats the point of loading the same image on
every page? evne though the page content may change the actual image and
scripts dont... is there any performance tips or ways to say catch these
types? such as GIF, JS,JPG, and PNG only? I have IIS 6 and ASP.NET 2.0
btw... thanks!
 
J

John Timney \(MVP\)

Browsers typically load all cachable data into the cache, so usually
whatever can be cached will be available for the next page request as long
as the users browser is not to set to always download the file each time its
requested.

Also, Asp.net is not responsable for caching images or js files, that
responsibility belongs to the IIS Enable Content Expiration settings. So,
put your images and js files in directories that can be marked with
expiration periods and you should have your client caching pretty much
sorted.

Regards

John Timney (MVP)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top