Dmitry Makovetskiyd
Dmitry Makovetskiyd

Reputation: 7053

Caching images with asp/http

I want to cache all the images on my site, so I used this code:

<%Response.AddHeader "Expires","Tue, 2 October 2013 00:00:00 GMT"%>

The problem is that google says the images are not cached, whenever I go to this site:

https://developers.google.com/speed/pagespeed

Also in chrome, I can see that it gives a Get response for all the images.

Why is that and how can I cache the images for the next year.

Upvotes: 0

Views: 1135

Answers (1)

Ofer Zelig
Ofer Zelig

Reputation: 17508

You have cached the page itself (which might also be a good thing though), rather than the images within. In order to cache images, you should set appropriate settings in IIS or your .config file(s).

Have a look at these:

Upvotes: 1

Related Questions