Posts: 19
Threads: 6
Joined: Aug 2011
Just implemented the htaccess cache headers recommended in the Wiki, but in Firefox (3.6 OS X, with WebDev toolbar) when i come to edit the source of a page via the admin pages, the source is seemingly cached, so changes are not shown - they do occur in the backend but only show up if the page is refreshed - not when the save updates button is pressed. The html editor is disabled in the backend settings and i am using version 3.0. Also occurs in Safari. Is this a known issue or am i missing something?
Many thanks for any help and congratulations on a really great CMS.
Posts: 1,848
Threads: 86
Joined: Aug 2009
Can you copy in here exactly what you changed?
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 19
Threads: 6
Joined: Aug 2011
I used the optimisation code from here:
http://get-simple.info/wiki/config:htacc...timization and pasted it into the .htaccess file in the web server root. it had the desired effect of caching and compressing my files, as i confirmed with safari audit.
Code:
# Enable GZIP
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</ifmodule>
# Expires Headers - 2678400s = 31 days
<ifmodule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 7200 seconds"
ExpiresByType image/gif "access plus 2678400 seconds"
ExpiresByType image/jpeg "access plus 2678400 seconds"
ExpiresByType image/png "access plus 2678400 seconds"
ExpiresByType text/css "access plus 518400 seconds"
ExpiresByType text/javascript "access plus 2678400 seconds"
ExpiresByType application/x-javascript "access plus 2678400 seconds"
</ifmodule>
# Cache Headers
<ifmodule mod_headers.c>
# Cache specified files for 31 days
<filesmatch "\.(ico|flv|jpg|jpeg|png|gif|css|swf)$">
Header set Cache-Control "max-age=2678400, public"
</filesmatch>
# Cache HTML files for a couple hours
<filesmatch "\.(html|htm)$">
Header set Cache-Control "max-age=7200, private, must-revalidate"
</filesmatch>
# Cache PDFs for a day
<filesmatch "\.(pdf)$">
Header set Cache-Control "max-age=86400, public"
</filesmatch>
# Cache Javascripts for 31 days
<filesmatch "\.(js)$">
Header set Cache-Control "max-age=2678400, private"
</filesmatch>
</ifmodule>
Health check passes except for ZipArchive:
PHP Version 5.2.17 - OK
cURL Module Installed - OK
GD Library Installed - OK
ZipArchive Not Installed - Warning
SimpleXML Module Installed - OK
Apache Mod Rewrite Installed - OK
Posts: 1,848
Threads: 86
Joined: Aug 2009
GS.info has this in it's .htaccess file and is running just fine (although i only use Chrome)
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 19
Threads: 6
Joined: Aug 2011
I will test with the html editor enabled to see if this is the problem. if necessary i can obviously disable cache in my editing browser but i just thought it seemed odd.
Posts: 2,094
Threads: 54
Joined: Jan 2011
d2a Wrote:I used the optimisation code from here: http://get-simple.info/wiki/config:htacc...timization and pasted it into the .htaccess file in the web server root. it had the desired effect of caching and compressing my files, as i confirmed with safari audit.
I suppose, you must somehow exclude /admin/* from caching.
Posts: 30
Threads: 4
Joined: Aug 2011
Hi,
the .htaccess code from wiki is ok, just add this code to prevent caching for .php files. otherwise you might want to disable caching for /admin folder (I don't have the code for that, sorry).
Code:
<FilesMatch "\.(php)$">
<IfModule mod_expires.c>
ExpiresActive Off
</IfModule>
<IfModule mod_headers.c>
Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
</IfModule>
</FilesMatch>
Posts: 19
Threads: 6
Joined: Aug 2011
[/root.] - diamond. thank you for your solution. all working A-ok now.
Posts: 30
Threads: 4
Joined: Aug 2011
No problems. I just did a quick test and created .htaccess file in /admin folder with the code I posted above. So now the website became amazingly fast and there are no glitches in control panel.