• Hello buddy, congratulation for the good job.

    My Browser Cache is not working, but Enabled. Contacting my hosting service provider, I got that mod_expires.c is not (and will never be) installed. So I ask you a simple question:

    It’s possible to implement Browser Cache if I don’t have mod_expires.c installed?

    I’m absolutely open for suggestions.

    If helps:

    <!– Performance optimized by W3 Total Cache. Learn more: https://www.w3-edge.com/wordpress-plugins/

    Served from: mercadordeideias.com.br @ 2015-04-29 15:28:47 by W3 Total Cache –>

    <!– W3 Total Cache: Page cache debug info:
    Engine: disk: enhanced
    Cache key: mercadordeideias.com.br/_index.html
    Caching: disabled
    Reject reason: User is logged in
    Creation Time: 0.822s
    Header info:
    Set-Cookie: wfvt_4091863227=554122df8f5ba; expires=Wed, 29-Apr-2015 18:58:47 GMT; path=/; httponly
    X-Pingback: https://mercadordeideias.com.br/wordpress/xmlrpc.php
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Cache-Control: no-cache, must-revalidate, max-age=0
    Pragma: no-cache
    Content-Type: text/html; charset=UTF-8
    X-Powered-By: W3 Total Cache/0.9.4.1
    Link: <https://wp.me/64Pim&gt;; rel=shortlink
    –>

Viewing 1 replies (of 1 total)
  • Thread Starter Guido

    (@guidobr)

    By now, after lots of research and attempts, I’m very satisfied.

    I don’t have mod_expires.c installed at my server so every functionality related to it isn’t possible for me. “Browser Cache” W3TC option relays on lots of mod_expires, so I deactivated it. I kept “Page Cache” only.

    After that, I rewrited my .htaccess implementing a cache system with mod_headers.c only.. less effective I think, but that’s what I can do.

    I placed some compressing code using mod_deflate.c to.

    As measured, 25-30% performance increase.
    I wish I could have mod_expires.c.
    Still opened for new opinions.

    By the way, I tested CDN with Amazon CloudFront, works fine. I had problems but after I selected “HTTP only” everything went right.

    Resulting .htaccess is as follows:

    # BEGIN Compress text files
    <ifModule mod_deflate.c>
    	<filesMatch "\.(css|js|x?html?|php)$">
    		SetOutputFilter DEFLATE
    	</filesMatch>
    </ifModule>
    # END Compress text files
    
    # BEGIN Cache-Control Headers
    <ifModule mod_headers.c>
    	# 1 YEAR
    	<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$">
    		Header set Cache-Control "max-age=29030400, public"
    	</FilesMatch>
    	# 8 DAYS
    	<FilesMatch "\.(jpg|jpeg|png|gif|swf)$">
    		Header set Cache-Control "max-age=691200, public"
    	</FilesMatch>
    	# 8 DAYS
    	<FilesMatch "\.(txt|xml|js|css)$">
    		Header set Cache-Control "max-age=691200, private"
    	</FilesMatch>
    	# NEVER CACHE
    	<FilesMatch "\.(html|htm|php|cgi|pl)$">
    		Header set Cache-Control "max-age=0, private, no-store, no-cache, must-revalidate"
    	</FilesMatch>
    </ifModule>
    # END Cache-Control Headers
    
    # BEGIN Turn ETags Off
    <ifModule mod_headers.c>
    	Header unset ETag
    </ifModule>
    FileETag None
    # END Turn ETags Off
    
    # BEGIN W3TC Page Cache core
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /
        RewriteCond %{HTTP_COOKIE} w3tc_preview [NC]
        RewriteRule .* - [E=W3TC_PREVIEW:_preview]
        RewriteCond %{REQUEST_METHOD} !=POST
        RewriteCond %{QUERY_STRING} =""
        RewriteCond %{REQUEST_URI} \/$
        RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC]
        RewriteCond "%{DOCUMENT_ROOT}/wordpress/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html" -f
        RewriteRule .* "/wordpress/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html" [L]
    </IfModule>
    # END W3TC Page Cache core
    
    # 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
Viewing 1 replies (of 1 total)
  • The topic ‘It's possible Browser Cache without having mod_expires installed?’ is closed to new replies.