High Performance Web Sites
High Performance Web Sites Essential Knowledge for Front-End Engineers By Steve Souders
September 2007
Pages: 168


Welcome Guest ( Log In | Register )

Near Future Expires Headers
Geert
post Aug 24 2008, 09:12 AM
Post #1


New Member
*

Group: Members
Posts: 2
Joined: 24-August 08
Member No.: 607



Here is the dilemma. I definitely would like to cut down the number of conditional GET requests by using a future Expires header. What I do not like, however, is that by using a far future Expires header, the filename of the component will need to be changed in order to push the new version to the browser. I do not want to go through the hassle of having to think about that for every occasional change to a site component.

So, I thought, what about a compromise of Rule 3 to get the best of both worlds: near future Expires headers. The idea is to make the components expire after, say, 1 to 24 hours. This way, you can keep using the same filenames for your components since the browser will still send a conditional GET request after maximum 1 to 24 hours, depending on the chosen lifetime. At the same time, this technique would also limit conditional GET requests to maximum one per lifetime duration and per component.

Well, that is the idea. If anybody has any thoughts or remarks about it, I would be glad to hear them. Thank you.
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies (1 - 6)
jennifersimonds
post Sep 21 2008, 09:37 PM
Post #2


New Member
*

Group: Members
Posts: 1
Joined: 21-September 08
Member No.: 1,226



QUOTE (Geert @ Aug 24 2008, 05:12 PM) *
Well, that is the idea. If anybody has any thoughts or remarks about it, I would be glad to hear them. Thank you.

I've thought about that too, but I think the problem is: What if you change, say, a company logo, which shows up on every page, perhaps in two or more places & sizes. When the company needs to change the logo, whoever visits during the next 1-24 hours will either see the old logo, or only one graphic will be changed & then some time later the others will catch up to the new versions.

But worse, what if the size & shape of the image had to change too? Say, from 100x100 to 120x160? During that changeover period, the HTML page would tell it to lay out the image in the new width & height, but insert the old image into that space. That would look ugly for a while.

I suppose if you had, for example, a 1-hour Expires, then when you have to update some images you could bring the website down for 1 hour to make sure everyone gets the new version in a consistent manner.
Go to the top of the page
 
+Quote Post
Geert
post Oct 28 2008, 12:55 PM
Post #3


New Member
*

Group: Members
Posts: 2
Joined: 24-August 08
Member No.: 607



Thanks for your input, Jennifer. As conclusion after reading your post, I think we can say that the idea of near future Expires headers works. However, if you really are making significant changes to for example a company logo, it may be better to push it to the browser via a new filename anyway. It is a trade-off.
Go to the top of the page
 
+Quote Post
fairybrbara
post Jul 27 2009, 10:23 PM
Post #4


New Member
*

Group: Members
Posts: 1
Joined: 27-July 09
Member No.: 19,389



Wow, superbe! Très original!


--------------------
Go to the top of the page
 
+Quote Post
icemanx79
post Aug 11 2009, 09:31 PM
Post #5


New Member
*

Group: Members
Posts: 1
Joined: 11-August 09
Member No.: 19,676



a short expires isn't a good idea if you are going set it to a day and only make changes every two days. best bet is to version things, if possible use a cms that will change version numbers or make it a build dependency


----------------------------------------------------------

Personal Wedding Website

This post has been edited by icemanx79: Aug 11 2009, 09:31 PM
Go to the top of the page
 
+Quote Post
Seemi
post Aug 22 2009, 10:45 PM
Post #6


Active Member
**

Group: Members
Posts: 20
Joined: 21-August 09
Member No.: 19,829



QUOTE (Geert @ Oct 28 2008, 12:55 PM) *
Thanks for your input, Jennifer. As conclusion after reading your post, I think we can say that the idea of near future Expires headers works. However, if you really are making significant changes to for example a company logo, it may be better to push it to the browser via a new filename anyway. It is a trade-off.


I think we must be careful while working on company logos as they all have copyrighted their logo!


--------------------
Does Someone Do Medical Assistant Jobs like me? then please guide me to start a Medical Assistant Career.
Go to the top of the page
 
+Quote Post
millix7
post Oct 3 2009, 08:56 AM
Post #7


New Member
*

Group: Members
Posts: 2
Joined: 3-October 09
Member No.: 20,487



I think that's a pretty cool idea. It sounds worth trying it myself. Thanks for sharing.


--------------------
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

RSS Lo-Fi Version Time is now: 22nd November 2009 - 04:44 PM