Expires HTTP Header
-
- Ensign (ENS)
- Posts: 2
- Joined: Mon Apr 13, 2009 7:19 am
Expires HTTP Header
Is anyone familiar with these or have any clue where I should start with setting one up.
- clevername
- Lieutenant (LT)
- Posts: 54
- Joined: Tue Jan 11, 2011 8:54 am
Re: Expires HTTP Header
This is an IIS setting you can change. Do a simple google search and you should find plenty of instructions on how to achieve this. The instructions should tell you to go into your IIS manager, right click the file/folder you want to apply these headers to, go to properties, custom headers, add expiration. I think these steps depend on the Server version. However, changing that setting is all you need to do to get the expires http headers.
This is for static content and you should be weary about adding expires headers to files you will update frequently. An expiration header is basically saying "this file will not change for x days." So a browser will cache that file for the x amount of time you set because it thinks it will be up to date for at least that period of time. So if you make changes to that file before your expiration header is up, you will need to rename it or refresh your cache to see the changes. It's also worth noting, you can set the expiration to keep adding expires headers after the time is up. So if you set the expiration for 2 days, every 2 days a users browser will look to see if there is a new version of that file. And add that new expiration header. So regardless of whether you change it at all. The server signals to the browser, that an updated file may be available every 2 days.
A lot of people set long distance expiration headers on things they do not plan on changing ever. I am talking about LONG DISTANCE; like setting its expiration to the year 2020.
Hope this helped
This is for static content and you should be weary about adding expires headers to files you will update frequently. An expiration header is basically saying "this file will not change for x days." So a browser will cache that file for the x amount of time you set because it thinks it will be up to date for at least that period of time. So if you make changes to that file before your expiration header is up, you will need to rename it or refresh your cache to see the changes. It's also worth noting, you can set the expiration to keep adding expires headers after the time is up. So if you set the expiration for 2 days, every 2 days a users browser will look to see if there is a new version of that file. And add that new expiration header. So regardless of whether you change it at all. The server signals to the browser, that an updated file may be available every 2 days.
A lot of people set long distance expiration headers on things they do not plan on changing ever. I am talking about LONG DISTANCE; like setting its expiration to the year 2020.
Hope this helped