Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iis only Add Expires headers to images

Tags:

iis

Add expires headers in iis is very Easy,but this cache all the static files. now i want only add expires headers to images,how can i do that? even i want cached specific file?

like image 750
Dudu Avatar asked Jan 15 '10 03:01

Dudu


People also ask

What will happen if you set an Expires header to a later date say 1 day )?

When you set an expires header for a resource, such as all jpeg images, the browser will store those resources in its cache. The next time the visitor comes back to the page it will load faster, as the browser will already have those images available.

What is the purpose of adding and expires header at web server?

Why is it important? Adding Expires Headers is important to reduce HTTP requests which reduces the time it take for the server to communicate with the browser. It also allows your users to reuse the cache files that have been stored in the browser to reduce the amount of files they need to download.

How do I add expired headers in IIS?

To configure an Expires header in IIS, right-click the Default Web Site in the Computer Management Console, select Properties, then click the HTTP Headers tab, which Figure 4 shows. Select the Enable Content Expiration check box and choose your expiration preferences.


1 Answers

  1. put all your images in one folder
  2. enter the manager--> yoursite--> images folder (or specific file)
  3. right click--> HTTP HEADERs--> Set expire header/date ! --> APPLY/OK
like image 107
liran Avatar answered Nov 23 '22 12:11

liran