|
|

02-11-2013, 01:22 AM
|
|
New Member
|
|
Join Date: Feb 2013
Posts: 7
|
|
[solved] getting caching right with enhanced page cache
Hello All,
I'm a Litespeed user and have not yet configured Litespeed cache.
For caching currently I'm running wordpress sites with w3 total cache with disk enhanced mode and APC opcode for database and objects.
When disk enhanced mode is enabled additional htacces rules are being applied like so;
# BEGIN W3TC Page Cache cache
FileETag MTime Size
<IfModule mod_mime.c>
AddType text/html .html_gzip
AddEncoding gzip .html_gzip
AddType text/xml .xml_gzip
AddEncoding gzip .xml_gzip
</IfModule>
<IfModule mod_deflate.c>
SetEnvIfNoCase Request_URI \.html_gzip$ no-gzip
SetEnvIfNoCase Request_URI \.xml_gzip$ no-gzip
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html M7200
</IfModule>
<IfModule mod_headers.c>
Header set X-Powered-By "W3 Total Cache/0.9.2.8"
Header set Vary "Accept-Encoding, Cookie"
Header set Pragma "public"
Header append Cache-Control "public, must-revalidate, proxy-revalidate"
</IfModule>
# END W3TC Page Cache cache
This is causing me some encoding issues as strange characters start to appear within the content, which I suspect is a result of compressing content twice maybe.
I started this thread in releation to the WP extension and then realised that it's probably caused by my environment.
http://wordpress.org/support/topic/p...0#post-3840966
Anyhow, what I would like to understand is what is the most effective configuration for cache that would give me the performance I'm looking for and resolve this problem with encoded characters appearing.
i.e. do I just need to change some htaccess directives and which ones
OR
should I be using Litespeed cache in this setup and how should I configure it
Your advice for a noob on Litespeed would be appreciated.
Oh you can see some examples of the problem on these sites under development.
http://www.giftsandmerchandise.co.uk/
http://www.portablegeneratorreviews4u.com/ - this one is worse
Thanks,
Nic
Last edited by NiteWave; 02-11-2013 at 06:12 PM..
|

02-11-2013, 01:38 AM
|
|
LiteSpeed Staff
|
|
Join Date: Sep 2009
Posts: 2,296
|
|
Quote:
SetEnvIfNoCase Request_URI \.html_gzip$ no-gzip
SetEnvIfNoCase Request_URI \.xml_gzip$ no-gzip
|
please try to change to
<IfModule litespeed>
RewriteRule \.html_gzip$ - [E=no-gzip:1,NC]
RewriteRule \.xml_gzip$ - [E=no-gzip:1,NC]
</IfModule>
see if it works.
|

02-11-2013, 01:57 AM
|
|
New Member
|
|
Join Date: Feb 2013
Posts: 7
|
|
|
Thanks Nitewave
Here's what I did.
I just added those to the htaccess file contained in the enhanced disk cache folder for W3TC (didn't remove the mod_deflate.c rules as they don't conflict) and reloaded the page (I didn' rebuild the cache). Output still contains encoded characters.
Any others ideas ?
# BEGIN W3TC Page Cache cache
FileETag MTime Size
<IfModule mod_mime.c>
AddType text/html .html_gzip
AddEncoding gzip .html_gzip
AddType text/xml .xml_gzip
AddEncoding gzip .xml_gzip
</IfModule>
<IfModule mod_deflate.c>
SetEnvIfNoCase Request_URI \.html_gzip$ no-gzip
SetEnvIfNoCase Request_URI \.xml_gzip$ no-gzip
</IfModule>
<IfModule litespeed>
RewriteRule \.html_gzip$ - [E=no-gzip:1,NC]
RewriteRule \.xml_gzip$ - [E=no-gzip:1,NC]
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html M7200
</IfModule>
<IfModule mod_headers.c>
Header set X-Powered-By "W3 Total Cache/0.9.2.8"
Header set Vary "Accept-Encoding, Cookie"
Header set Pragma "public"
Header append Cache-Control "public, must-revalidate, proxy-revalidate"
</IfModule>
# END W3TC Page Cache cache
Last edited by nisiwi; 02-11-2013 at 02:00 AM..
|

02-11-2013, 03:03 AM
|
|
LiteSpeed Staff
|
|
Join Date: Sep 2009
Posts: 2,296
|
|
|
I tested the 2 websites you provided in 1st post, they're ok but server is cloudflare-nginx. not sure if litespeed is ok now.
since the 2 sites under development, best to serve directly by litespeed, not behind cloudflare for easier to test.
|

02-11-2013, 03:38 AM
|
|
New Member
|
|
Join Date: Feb 2013
Posts: 7
|
|
cloudflare disabled
Yes both sites run through cloudflare - I've paused cloudflare now so they should go direct.
Both sites display the encoded characters in varying details.
For http://www.giftsandmerchandise.co.uk/
The footer contains (with encoded character)
All Content Copyright © Qtable (Gifts & Merchandise) 2013 - All Rights Reserved - E&O.E
For http://www.portablegeneratorreviews4u.com/
The main content in front page - lots of repetitions of  throughout text
old portable
portable generatorsÂ
Forum is replacing character with encoded - Â which is an accented "A"
Last edited by nisiwi; 02-11-2013 at 03:52 AM..
|

02-11-2013, 04:50 AM
|
|
LiteSpeed Staff
|
|
Join Date: Sep 2009
Posts: 2,296
|
|
please try add following to .htaccess
AddDefaultCharset utf-8
it's not likely an issue of
Quote:
|
This is causing me some encoding issues as strange characters start to appear within the content, which I suspect is a result of compressing content twice maybe.
|
|

02-11-2013, 05:24 AM
|
|
New Member
|
|
Join Date: Feb 2013
Posts: 7
|
|
Thank you
of course!
Simple and resolved (that problem) !
OK, now for the rest of the setup. Would you say it could be optimised further and if so what would you recommend ?
Page load times seem to vary from 2 - 6 seconds.
Thanks again NiteWave
Nic
Last edited by nisiwi; 02-11-2013 at 05:36 AM..
|

02-11-2013, 06:12 PM
|
|
LiteSpeed Staff
|
|
Join Date: Sep 2009
Posts: 2,296
|
|
Sorry, your question is too general and I'm not able to reply 
however the start of the thread is specific and an good question. mark as [solved]
|

02-16-2013, 04:10 AM
|
|
New Member
|
|
Join Date: Feb 2013
Posts: 7
|
|
do I need lite speed
OK, I understand it may not be very specific NiteWave however it is important as I'm wondering why I should be using LiteSpeed at all as I may not be making full use of its capabilities ?
Is there some guidance on optimisation ? i.e. should or could I also be making use of Litespeed cache ?
|

02-16-2013, 04:57 AM
|
|
LiteSpeed Staff
|
|
Join Date: Sep 2009
Posts: 2,296
|
|
|
I think it depends on your requirement.
can you brief the business plan of your server?
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 08:26 PM.
|
|