Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Last month I used standard mod_expires in my htaccess to speed up the site. I had no problems.

Then I installed the WPTouch plugin to provide a mobile version. It worked at first but then it stuck my site on the mobile version for all users. I deactivated the plugin to no effect, so I deleted the plugin and this returned my desktop version.

Now I'm having a problem with revisions to posts, they don't show up for some time. Could this be a problem with the mod_expires or more likely some residual problem from WPTouch?

<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On 
# Default directive
ExpiresDefault "access plus 5 minutes"
# CSS
ExpiresByType text/css "access 1 month"
# Data interchange
ExpiresByType application/json "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType text/xml "access plus 0 seconds"
# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
# HTML
ExpiresByType text/html "access plus 0 seconds"
# PHP
ExpiresByType text/php "access plus 0 seconds"
# HTML components (HTCs)
ExpiresByType text/x-component "access plus 1 month"
# Javascript
ExpiresByType application/javascript "access plus 1 year"
# Manifest files
ExpiresByType application/x-web-app-manifest+json   "access plus 0 seconds"
ExpiresByType text/cache-manifest "access plus 0 seconds"
# Web feeds
ExpiresByType application/atom+xml  "access plus 1 hour"
ExpiresByType application/rss+xml    "access plus 1 hour"
# Web fonts
ExpiresByType application/font-woff     "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject         "access plus 1 month"
ExpiresByType application/x-font-ttf                "access plus 1 month"
ExpiresByType font/opentype                         "access plus 1 month"
ExpiresByType image/svg+xml                         "access plus 1 month"
</IfModule>

<ifModule mod_headers.c>
FileETag None
Header unset ETag
</IfModule>
share|improve this question
    
What's your mod_expires code? I would only advocate aggressive caching on assets like CSS, JS & images. Leave HTML alone & let WordPress handle headers. –  TheDeadMedic Jul 12 '13 at 4:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.