Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Expiry date for Images
05-21-2011, 10:06 PM
Post: #1
Expiry date for Images
Is it something like expiry date of images? I once tested site with YSlow! in chrome and it recommended that your site images have no expiry, what does this mean or I got it wrong. Please share it with me.

Regards.
Quote this message in a reply
05-21-2011, 11:42 PM
Post: #2
RE: Expiry date for Images
Image expiry means adding Expires in header which specifies a time far enough in the future so that clients (browsers) won't try to re-fetch images that haven't changed. That increased the page load time because clients won't try to fetch images every time visiting a site.

[Image: userbar-for-yuva-pix.png]
Quote this message in a reply
05-22-2011, 12:11 AM
Post: #3
RE: Expiry date for Images
Thanks a lot for explaining, can you tell me how to do this? Which code to be put in header?
Quote this message in a reply
05-22-2011, 12:47 AM (This post was last modified: 05-22-2011 12:48 AM by sukanjan.k.)
Post: #4
RE: Expiry date for Images
Its not so easy as it sounds, I know how to put a Expires HTTP header in a Apache server but can't tell you how to do in a windows server. You can take a look at this apache help doc first, there everything explained about the mod_expires Module.

Code:
http://httpd.apache.org/docs/current/mod/mod_expires.html

Also this can help you...

Code:
http://httpd.apache.org/docs/current/mod/mod_headers.html#header

[Image: userbar-for-yuva-pix.png]
Quote this message in a reply
05-22-2011, 10:31 AM
Post: #5
RE: Expiry date for Images
Thanks a lot. Really worth looking article.
Quote this message in a reply
01-02-2012, 11:22 AM
Post: #6
RE: Expiry date for Images
Well, I myself found a good way to do it in PHP, take a look:
Code:
http://www.daniweb.com/web-development/php/threads/192918
and
Code:
http://php.net/manual/en/function.header.php
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)