• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 39 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Speeding up CMSMS
PostPosted: Thu Jul 26, 2007 9:15 am 
Offline
Forum Members
Forum Members

Joined: Tue May 01, 2007 2:52 am
Posts: 27
Here's what I do for my site (it's not accessible to public right now):
  • Open index.php
  • Scroll down until you see the header("Content-Type") line
  • Below that line add this: header("Content-Length: ".strlen($html));
  • Then add this line: header("Cache-Control: public, max-age=60, s-maxage=60");

For more info about those lines read Caching Tutorial for webmasters and web authors: http://www.mnot.net/cache_docs/


Top
 Profile  
 
 Post subject: Re: Speeding up CMSMS
PostPosted: Mon Jul 30, 2007 1:47 pm 
Offline
Support Guru
Support Guru

Joined: Mon Jul 24, 2006 3:27 pm
Posts: 3690
Location: Paris
Hello,

Thank you.
I'm pretty sure this is what Apache's mod_cache is doing without touching CMSms' code.
But not all hosting providers provide mod_cache which they should love.

Pierre M.

_________________
-- Pierre, support team member. comodérateur du forum francophone.
Please read "how to submit installation/support requests" before posting. Don't send private messages to ask for support.
Want to contribute to CMSms ? Improve the wiki with your forum account.


Top
 Profile  
 
 Post subject: Re: Speeding up CMSMS
PostPosted: Mon Jul 30, 2007 1:52 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 6583
Location: Fernie British Columbia, Canada
Though the content length mod should be harmless, the caching header should only be done if the page is marked as cachable..  dynamic pages (like those with content from FEU or CustomContent, etc), should not cache.

_________________
Follow me on twitter
--
if you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
----------------
Don't make me angry..... you won't like me when I'm angry....


Top
 Profile  
 
 Post subject: Re: Speeding up CMSMS
PostPosted: Thu Aug 16, 2007 11:04 am 
Offline
Power Poster
Power Poster

Joined: Fri Mar 03, 2006 1:32 pm
Posts: 490
Hi!

Depending on the nature of your site, you might cache various elements via .htaccess file.

Here's what I use:

Code:
ExpiresActive on
ExpiresByType image/gif "access plus 6 months"
ExpiresByType image/jpeg "access plus 6 months"
ExpiresByType image/png "access plus 6 months"
ExpiresByType text/css "access plus 6 months"
ExpiresByType text/javascript "access plus 6 months"
ExpiresByType text/html "access plus 1 day"
ExpiresByType application/x-javascript "access plus 6 months"

<Files ~ "\.(js|css|gif|jpg|png)$">
Header append Cache-Control "public"
</Files>


This is from a site which barely changes.

hth,
Alex


Top
 Profile  
 
 Post subject: Re: Speeding up CMSMS
PostPosted: Thu Aug 16, 2007 12:06 pm 
Hi Alex,

thanks for that (for me unknown) hints - will adding this to tuning guide :).


Top
  
 
 Post subject: Re: Speeding up CMSMS
PostPosted: Thu Aug 16, 2007 2:59 pm 
Offline
Power Poster
Power Poster

Joined: Fri Mar 03, 2006 1:32 pm
Posts: 490
Hi Andreas,

don't forget to add this link:
http://www.ircache.net/cgi-bin/cacheability.py

With this "cacheability engine"  you can check how the elements of your page are cached - nice for nailing down specific cache conditions.

Additionally I can recommend the "live http headers" extension for Firefox:
http://addons.mozilla.org/firefox/addon/3829

And as taufkip already mentioned, you have to understand
http://www.mnot.net/cache_docs/
first or you'll get in trouble.


Cheers,
Alex


Last edited by faglork on Thu Aug 16, 2007 3:04 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Speeding up CMSMS
PostPosted: Thu Aug 16, 2007 4:16 pm 
Offline
Support Guru
Support Guru

Joined: Mon Jul 24, 2006 3:27 pm
Posts: 3690
Location: Paris
Thank you Alex.
Andreas, where is the tuning guide ?
Have fun

Pierre M.

_________________
-- Pierre, support team member. comodérateur du forum francophone.
Please read "how to submit installation/support requests" before posting. Don't send private messages to ask for support.
Want to contribute to CMSms ? Improve the wiki with your forum account.


Top
 Profile  
 
 Post subject: Re: Speeding up CMSMS
PostPosted: Thu Aug 16, 2007 5:00 pm 
Pierre M. wrote:
Andreas, where is the tuning guide ?


It's currently only available in german

http://forum.cmsmadesimple.org/index.ph ... 474.0.html

But maybe Google can help ;)

http://translate.google.com/translate?u ... de&ie=UTF8

(for french users only)

Hope you can understand it ...


Last edited by cyberman on Fri Aug 17, 2007 1:28 pm, edited 1 time in total.

Top
  
 
 Post subject: Re: Speeding up CMSMS
PostPosted: Fri Aug 17, 2007 1:31 pm 
OK, and here the link for all english speaking users

http://translate.google.com/translate?u ... uage_tools

(made this topic sticky)


Top
  
 
 Post subject: Re: Speeding up CMSMS
PostPosted: Mon Aug 20, 2007 12:12 pm 
faglork wrote:
Depending on the nature of your site, you might cache various elements via .htaccess file.


Hmm, have tried it from a vserver, but got only a 500 error from server :-\ ...

What's wrong?


Top
  
 
 Post subject: Re: Speeding up CMSMS
PostPosted: Mon Aug 20, 2007 12:56 pm 
Offline
Support Guru
Support Guru

Joined: Mon Jul 24, 2006 3:27 pm
Posts: 3690
Location: Paris
What is in the logs ?

Pierre M.

_________________
-- Pierre, support team member. comodérateur du forum francophone.
Please read "how to submit installation/support requests" before posting. Don't send private messages to ask for support.
Want to contribute to CMSms ? Improve the wiki with your forum account.


Top
 Profile  
 
 Post subject: Re: Speeding up CMSMS
PostPosted: Mon Aug 20, 2007 1:45 pm 
Offline
Power Poster
Power Poster

Joined: Fri Mar 03, 2006 1:32 pm
Posts: 490
cyberman wrote:

What's wrong?


Do you have mod_expires installed?

Alex


Top
 Profile  
 
 Post subject: Re: Speeding up CMSMS
PostPosted: Mon Aug 20, 2007 5:07 pm 
Thx Alex (and Pierre).

I see I must have tomatos on my eyes - mod_expires was not installed (I've afraid it) 8).


Top
  
 
 Post subject: Re: Speeding up CMSMS
PostPosted: Tue Aug 21, 2007 6:59 am 
faglork wrote:
And as taufkip already mentioned, you have to understand
http://www.mnot.net/cache_docs/


Great document - I see, I have a lot to translate ;) ...


Top
  
 
 Post subject: Re: Speeding up CMSMS
PostPosted: Tue Aug 21, 2007 1:48 pm 
Offline
Support Guru
Support Guru

Joined: Mon Jul 24, 2006 3:27 pm
Posts: 3690
Location: Paris
cyberman wrote:
faglork wrote:
And as taufkip already mentioned, you have to understand
http://www.mnot.net/cache_docs/


Great document - I see, I have a lot to translate ;) ...


Yes, great. I like very much what is said about URLs, configs... And even already translated in French and Czech :)
Please notice : this march version is focused on browser side cache tuning (via mod_expires and mod_headers). May be the next will add mod_cache about webserver cache tuning in front of a "dynamic" content like CMSms (and obviously all expires and headers recommandations remain efficient).

Pierre M.

_________________
-- Pierre, support team member. comodérateur du forum francophone.
Please read "how to submit installation/support requests" before posting. Don't send private messages to ask for support.
Want to contribute to CMSms ? Improve the wiki with your forum account.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 39 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users


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 post attachments in this forum

Search for:
Jump to:  
Arvixe - A CMSMS Partner