Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
.htaccess cache settings break admin page editing in Firefox?
#1
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.
Reply
#2
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!
Reply
#3
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
Reply
#4
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!
Reply
#5
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.
Reply
#6
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.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#7
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>
Reply
#8
[/root.] - diamond. thank you for your solution. all working A-ok now.
Reply
#9
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.
Reply




Users browsing this thread: 1 Guest(s)