Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 10-29-2008, 07:09 PM   #1 (permalink)
 
Newb Techie

Join Date: Jul 2008

Posts: 30

Rex100 is on a distinguished road

Default

Tech-Forums,

I want to add a far Future Header Header to tell people's browser to hold on to my images (instead of reloading them from the server) to improve download speed for repeat visitors. I wrote this for my HTaccess file.

ExpiresActive On
ExpiresByType text/html "access plus 25 minutes"
ExpiresByType image/gif "access plus 5 years"
ExpiresByType image/jpg "access plus 5 years"

I added the text directive so that when I edit my text it won't be long before most visitors see the change.

1) Where in the HTaccess file would I put these directives?
Right now the general order of my HTacess file is
50 or so 301 redirects
Error page directions
Front Page stuff from the starting stock version of the HTAccess file
Stuff about Wordpress.

2) Should I use this style of directive use instead
ExpiresByType image/gif A157680000 ?

I read that "A is used, for image files that don't change very often, particularly for a set of related documents that all refer to the same images (i.e., the images will be accessed repeatedly within a relatively short timespan).

My images don't change often but will be accessed more often in a relatively short peroid of time as traffic increase - as any ordinary website working on increasing traffic would.


Thanks For the help,

Rexx





(before or after a bunch of redirects, and before or after

I guess that code would be

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html "access plus 25 minutes"
ExpiresByType image/gif "access plus 5 years"
ExpiresByType image/jpg "access plus 5 years"
</IfModule>


Down at the bottom after the Fromt Page code is
the module rewrite for wordpress.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress


So should the expires module come just after or just before the rewrite module?

Thanks

Last edited by Mak213; 10-30-2008 at 09:24 PM.
Rex100 is offline  
Old 10-31-2008, 02:01 AM   #2 (permalink)
 
Newb Techie

Join Date: Jul 2008

Posts: 30

Rex100 is on a distinguished road

Default Re: Far Future Expires Header

In the question above, ignore "(before or after a bunch of redirects, and before or after". 'Not sure how that got there.
Rex100 is offline  
 
Closed Thread

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
PC Games - best hardware for new and future games dingledow Other Computer HW Topics 0 03-29-2008 01:16 PM
What do you think guys? Future plans Sora Building, Buying, or Upgrading High Performance PC Systems 20 05-30-2007 04:25 PM
Cellfactor: Revolution gonna be DX10 in the future? Wildside PC Gaming 0 05-12-2007 08:25 PM
future proof high end mobo ? suggest me..... sankirsh Building, Buying, or Upgrading High Performance PC Systems 12 05-08-2007 06:51 AM
P5N E or P5B E? Future proofing... small256 Building, Buying, or Upgrading High Performance PC Systems 6 04-26-2007 12:22 PM