Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.3 RN Feedback/Suggestions
Author Message
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Thu May 28, 2009 8:44 am Reply with quote

I was curious why some of the content is set to expire so quickly in the RN htaccess ?
ExpiresByType image/x-icon "access plus 1 month"
ExpiresByType text/css "access plus 5 minutes"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType text/plain "access plus 15 minutes"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType video/x-flv "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/html "access plus 5 minutes"
ExpiresByType text/javascript "access plus 5 minutes"
ExpiresByType application/x-javascript "access plus 5 minutes"


Specifically the CSS and JS files....?
 
View user's profile Send private message Visit poster's website
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Thu May 28, 2009 12:37 pm Reply with quote

It's a compromise.
If you know that you wont be changing any images, css or js then you could extend the cache life but even at these relatively low values t often requires a page fresh when pasting new news or module setting changes to force an update.
 
View user's profile Send private message Send e-mail
spasticdonkey







PostPosted: Thu May 28, 2009 1:54 pm Reply with quote

thx, sounds like it's set that way for developers Smile
I'll go ahead and crank those setting up, since it's not really necessary for my users to re-download all my js and css on daily basis; or more than once per session.

If you have 50 users visiting your site daily, accessing 100k in various scripts and css, that adds up when your paying for bandwidth (1.5gb)
 
Guardian2003







PostPosted: Thu May 28, 2009 2:19 pm Reply with quote

CSS and JS is usually cached by the browser but every little helps Smile
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Thu May 28, 2009 8:12 pm Reply with quote

spasticdonkey, I don't know that I would call it "for developers". For if you publish a change to a page which also requires a change to a JS file in order to work properly, how long are you willing to wait for it to work again????

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
spasticdonkey







PostPosted: Thu May 28, 2009 10:16 pm Reply with quote

this looks like a interesting approach

http://particletree.com/notebook/automatically-version-your-css-and-javascript-files/

then you can cache as long as you want Smile

and better than inserting a fake variable for version'n
<link rel="stylesheet" href="http://www.somesite.com/style.css?version=1" type="text/css" />
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.3 RN Feedback/Suggestions

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©