• Resolved xprt007

    (@xprt007)


    Hi

    Since I found your plugin yesterday, it has made a considerable difference in speed @ http://bit.ly/1AhLPI2. After trying out different plugins following recommendations at gtmetrix.com & webpagetest.org, it helped improve gtmetrix results from under 88% (Page Speed Grade) & 75% at best (YSlow Grade) to 90 – 93% & 83 – 88%, respectively.

    I discovered the plugin had placed this code at the bottom of the .htaccess code.

    ## BEGIN Expires Caching (Leverage Browser Caching) ##
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg “access 2 week”
    ExpiresByType image/jpeg “access 2 week”
    ExpiresByType image/gif “access 2 week”
    ExpiresByType image/png “access 2 week”
    ExpiresByType text/css “access 2 week”
    ExpiresByType application/pdf “access 2 week”
    ExpiresByType text/x-javascript “access 2 week”
    ExpiresByType application/x-shockwave-flash “access 2 week”
    ExpiresByType image/x-icon “access 2 week”
    ExpiresDefault “access 2 week”
    </IfModule>
    ## END Expires Caching (Leverage Browser Caching) ##

    # END WP Performance Score Booster Settings

    To help with browser caching, BEFORE using your plugin, I had had a recommendation to place some other code at the top of the .htaccess file, which I guess has a repetition of code at the beginning & end.
    This other code at the top is:

    ## EXPIRES CACHING ##
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg “access 1 year”
    ExpiresByType image/jpeg “access 1 year”
    ExpiresByType image/gif “access 1 year”
    ExpiresByType image/png “access 1 year”
    ExpiresByType text/css “access 1 month”
    ExpiresByType application/pdf “access 1 month”
    ExpiresByType text/x-javascript “access 1 month”
    ExpiresByType application/x-shockwave-flash “access 1 month”
    ExpiresByType image/x-icon “access 1 year”
    ExpiresDefault “access 2 days”
    </IfModule>
    ## EXPIRES CACHING ##

    • The fact is this does not seem to affect the site speed BUT is it safe to get rid of that at the top?
    • I read somewhere, I think a recommendation from Gtmetrix (http://gtmetrix.com/add-expires-headers.html) that longer periods for expiration of the cache are better & that is probably what the author of the other code uses as a premise. You have “access 2 week”, they “access 1 year”, other files “access 1 month” & another author “access plus 1 year” for some files & others “access plus 1 month”.
      What do you say about this? I just need the best option.
    • At webpagetest.org, the site http://bit.ly/1AhLPI2 somehow keeps getting mostly “F” in browser caching, although I must say at Gtmetrix.com ca 92% for browser caching. Could there be a problem with the analysis of webpagetest.org?
    • Lastly, if I may ask, and this may be outside the scope of your plugin: even if I have used several image smush plugins (wp smush, EWWW Image Optimizer, etc) & they have nothing more to smush, “Compress Images” at webpagetest.org also keeps churning “F”. Could something here be wrong again? Gtmetrix’s “Optimize images” gives 81%, which I think is not too bad.

    Your advice would be highly appreciated.

    Regards

    https://wordpress.org/plugins/wp-performance-score-booster/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter xprt007

    (@xprt007)

    Hi

    I hope my questions make some sense … ;).
    Any way, some form of response would be appreciated.

    Regards

    Plugin Author Dipak C. Gajjar

    (@dipakcg)

    xprt007, Here are my thoughts.

    – You can get rid of either one of expire caching code.
    – I don’t think so. You put expire caching code inside .htaccess is suffice.
    – Not sure but might be possible.
    – Might be something wrong with webpagetest.org again. Why don’t you consider only GTMetrix results? They are accurate enough and use widely.

    I hope this helps.

    I appreciate you spend some time leaving 5-star reviews (if you’re happy with the performance results).

    Thread Starter xprt007

    (@xprt007)

    Hi Dipak

    Thank you for your response. I will be acting on those points.
    Thank you, too for the great plugin.

    Regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Some help to tweak the .htaccess file’ is closed to new replies.