0

since ca. 4-6 weeks I have caching problems in my WP backend.

Frontend of WP site is: www.speed-ville.de

Examples for caching problems: – modifications don’t show up (in browser in backend) – e.g. I delete users; have to refresh like 5-6 times or switch to anonymous mode (Chrome) to see the change happening in backend – or: I switch language in backend (settings > general) backend is after hitting "save button" still in previous language; after lots of refreshing it then changes – etc pp.

I talked to various Devs and also to my hoster.

It looks very much as if caching comes from browser caching which is indeed set in htaccess file.

Hoster said its possible to exclude “wp-admin” (WP backend) from browser caching.

But I unfortunately don’t know how to do that.

Question: Could anyone please help me out and give me the “code” for excluding “Wp-admin” in browser caching in htaccess file?

The current code in htaccess is:

————-

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

# Deflate Compression by FileType
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/atom_xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-shockwave-flash
</IfModule>

<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>

<IfModule mod_headers.c>

<filesMatch “.(jpg|jpeg|png|gif|ico)$”>
Header set Cache-Control “max-age=31536000, public”
</filesMatch>

<filesMatch “.(css|js)$”>
Header set Cache-Control “max-age=604800, public”
</filesMatch>

Header set Cache-Control “max-age=86400, public”

</IfModule>

1 Answer 1

0

Your hoster is wrong. no logged in user should be cached, admin side or not. This is not just an annoyance type of issue, it is an actual security problem that might cause the disclose of your passwords.

Just remove the last caching line from your htaccess, it is unlikely to do you any good in any case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.