Gossamer Forum
Home : General : Chit Chat :

server cache with htaccess

Quote Reply
server cache with htaccess
I'm using this file for speeding up my website.
The red part below is causing trouble. Cause caching the html files is not compatible with the GT Community Login. The users can not see, that he is already logged in, cause he sees cached html files.
Does anybody know a solution except to quit caching html files???

Thanks
Matthias

Code:
# BEGIN Compress text files
<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript
</ifModule>
# END Compress text files
# BEGIN Expire headers
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 5 seconds"
ExpiresByType image/x-icon "access plus 2592000 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType image/gif "access plus 2592000 seconds"
ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 216000 seconds"
ExpiresByType application/javascript "access plus 216000 seconds"
ExpiresByType application/x-javascript "access plus 216000 seconds"
ExpiresByType text/html "access plus 600 seconds"
ExpiresByType application/xhtml+xml "access plus 600 seconds"
</ifModule>
# END Expire headers
# BEGIN Cache-Control Headers
<ifModule mod_headers.c>
<filesMatch "\.(ico|jpe?g|png|gif|swf)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(css)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(js)$">
Header set Cache-Control "private"
</filesMatch>
<filesMatch "\.(x?html?|php)$">
Header set Cache-Control "private, must-revalidate"
</filesMatch>
</ifModule>
# END Cache-Control Headers
# BEGIN Turn ETags Off
FileETag None
# END Turn ETags Off

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] server cache with htaccess In reply to
To be honest - HTML caching is a bit overrated. Generally, the page size is very small (at least in comparison to images, JS, CSS files etc .. which tend to be a LOT larger than a 10-15kb HTML document Smile)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] server cache with htaccess In reply to
Andy wrote:
To be honest - HTML caching is a bit overrated. Generally, the page size is very small (at least in comparison to images, JS, CSS files etc .. which tend to be a LOT larger than a 10-15kb HTML document Smile)

Thanks for the reply Andy.
I will quit HTML caching then...

Matthias
gpaed.de