• tabestmaker

    (@tabestmaker)


    hi guys i was looking into improving my blog speed and i get
    Leverage browser caching
    Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.
    i tried many plugins and also adding the code to htaccess but it seems i got no results
    http://techneti.com/

Viewing 5 replies - 1 through 5 (of 5 total)
  • barnez

    (@pidengmor)

    Try adding this to your .htaccess file above your #BEGIN WORDPRESS #END WORDPRESS rules:

    # BEGIN Expire headers
    <ifModule mod_expires.c>
        ExpiresActive On
        ExpiresDefault "access plus 5 seconds"
        ExpiresByType image/x-icon "access plus 2592000 seconds"
        ExpiresByType image/jpeg "access plus 2592000 seconds"
        ExpiresByType image/png "access plus 2592000 seconds"
        ExpiresByType image/gif "access plus 2592000 seconds"
        ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
        ExpiresByType text/css "access plus 604800 seconds"
        ExpiresByType text/javascript "access plus 648000 seconds"
        ExpiresByType application/javascript "access plus 648000 seconds"
        ExpiresByType application/x-javascript "access plus 648000 seconds"
        ExpiresByType text/html "access plus 600 seconds"
        ExpiresByType application/xhtml+xml "access plus 600 seconds"
    </ifModule>
    # END Expire headers
    barnez

    (@pidengmor)

    Also, there seems to be an issue with your minify:
    http://tools.pingdom.com/fpt/#!/dUhs3h/http://techneti.com/

    Thread Starter tabestmaker

    (@tabestmaker)

    hi thanks for your response
    i actually deactivated w3c total cache and got better score
    and i also added the code but the problem is still showing
    https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Ftechneti.com&tab=desktop

    barnez

    (@pidengmor)

    No problem. It seems that there are just a small number of files (7) that are now not caching. You could try adding this to address those 2 x .jpg files:

    ExpiresByType image/jpg "access plus 2592000 seconds"

    Not too sure why the others are not caching, although the google analytics js file is external so you can discount that, and they really shouldn’t make a noticeable deal of difference to your site load.

    Regarding the caching plugin, have you tried:
    https://wordpress.org/plugins/wp-super-cache/
    [*EDITED* Quick Cache link removed as plugin no longer maintained]

    It is a solid caching plugins, straightforward to set up and should help your site load.

    Thread Starter tabestmaker

    (@tabestmaker)

    i installed the plugin and got some good results
    but the problem that made me put this post still exists

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Leverage browser caching WordPress’ is closed to new replies.