Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Web Hosting Forum


You are currently viewing our Web Hosting Forum as a guest. Please register to participate.
Login



Reply
Is this the correct way to set "Expires Header" in .htaccess
Old 07-21-2010, 10:13 AM Is this the correct way to set "Expires Header" in .htaccess
TWD
TWD's Avatar
King Spam Talker

Posts: 1,190
Trades: 0
Code:
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/gif "access plus 2 years"
ExpiresByType image/jpeg "access plus 2 years"
ExpiresByType image/png "access plus 2 years"
ExpiresByType text/css "access plus 2 years"
ExpiresByType text/javascript "access plus 2 years"
ExpiresByType application/x-javascript "access plus 2 years"
</IfModule>
I am trying to improve my YSlow and Page Speed scores.
Setting Expires Header was one of the recommendations
I want to implement.
__________________
RATE-MY-WEBSITE.com "Free website reviews by real web professionals"
Please login or register to view this content. Registration is FREE
TWD is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-21-2010, 11:18 PM Re: Is this the correct way to set "Expires Header" in .htaccess
vivekar's Avatar
Webmaster Talker

Posts: 612
Trades: 0
Also, set expiry for favicon.

Code:
# special MIME type for icons - see http://www.iana.org/assignments/media-types/image/vnd.microsoft.icon
    AddType image/vnd.microsoft.icon .ico
  # now we have icon MIME type, we can use it
   # my favicon doesn't change much
  ExpiresByType image/vnd.microsoft.icon "access plus 3 months"

Hope that helps.
__________________

Please login or register to view this content. Registration is FREE
(Active since 2003) |
Please login or register to view this content. Registration is FREE
vivekar is offline
Reply With Quote
View Public Profile Visit vivekar's homepage!
 
Old 07-22-2010, 02:35 AM Re: Is this the correct way to set "Expires Header" in .htaccess
TWD
TWD's Avatar
King Spam Talker

Posts: 1,190
Trades: 0
awesome. thanks for the tip!
__________________
RATE-MY-WEBSITE.com "Free website reviews by real web professionals"
Please login or register to view this content. Registration is FREE
TWD is offline
Reply With Quote
View Public Profile
 
Old 08-04-2010, 06:14 AM Re: Is this the correct way to set "Expires Header" in .htaccess
Average Talker

Posts: 18
Trades: 0
Hi,

I believe the following links will be useful for you. Please go through them.

http://serverfault.com/questions/861...er-in-htaccess
http://www.askapache.com/htaccess/ap...e-control.html
Jerinjames is offline
Reply With Quote
View Public Profile Visit Jerinjames's homepage!
 
Reply     « Reply to Is this the correct way to set "Expires Header" in .htaccess
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13303 seconds with 12 queries