• Resolved SuzieB

    (@suzieb)


    1. Webp images aren’t being cached according to the Lightspeed report. They were created by Shortpixel. Is this something I can fix with WP-optimize?

    2. Eliminate render-blocking resources – I’ve put the minify JS and CSS URLs to load asynchronously. The folder number changes each time I run the speed test. I’ve tried to shorten the url past the number folder (ex /assets/wpo-minify-header-a2181235.min.js) but this does not work either. What am I doing wrong?

    3. Bonus question! What is the lifespan of the cache? 1 image that did show up as cache says 1 day. Is that the longest I can have it with the free version? Speed test complains about the length not being long enough. I have preload pages created.

Viewing 3 replies - 1 through 3 (of 3 total)
  • @suzieb

    1. Webp images aren’t being cached according to the Lightspeed report. They were created by Shortpixel. Is this something I can fix with WP-optimize?
    > WPO does add the rule to the htaccess when enabling browser caching. So if it’s handled on the website, it should be fine. Though I believe shortpixel store the images on their own CDN, so it’s out of WP-optimize control.

    2. Eliminate render-blocking resources – I’ve put the minify JS and CSS URLs to load asynchronously. The folder number changes each time I run the speed test. I’ve tried to shorten the url past the number folder (ex /assets/wpo-minify-header-a2181235.min.js) but this does not work either. What am I doing wrong?
    > Please check this article on how you can fix eliminate render blocking resources issue: https://getwpo.com/faqs/how-can-i-eliminate-render-blocking-resources/

    3. Bonus question! What is the lifespan of the cache? 1 image that did show up as cache says 1 day. Is that the longest I can have it with the free version? Speed test complains about the length not being long enough. I have preload pages created.
    > By default the lifespan is set to 24 hours, you can change the lifespan from WP-Optimize > Cache > Cache settings > Cache lifespan.

    • This reply was modified 3 years, 10 months ago by Harshad.
    • This reply was modified 3 years, 10 months ago by Harshad.
    Thread Starter SuzieB

    (@suzieb)

    WPO does add the rule to the htaccess when enabling browser caching. So if it’s handled on the website, it should be fine. Though I believe shortpixel store the images on their own CDN, so it’s out of WP-optimize control.

    I wondered if WPO should be adding to the htaccess, it’s not. I guess that’s the problem.

    I uninstalled WPO, deactivated all of my plugins and reinstalled. No change.

    I am also getting the Unexpected Response some others have experienced when running the preload. (it runs, just get that error)

    If you want to give me the code that should be adding to htaccess, I can add it and see if that fixes things.

    Side note: The images ShortPixel created were added to files on my server, whether they serve them from there or not, I do not know.

    @suzieb Please use the following rules for Browse cache to be added in .htaccess file:

    # BEGIN WP-Optimize Browser Cache
    <IfModule mod_expires.c>
    	ExpiresActive On
    	ExpiresByType text/css "access 28 days"
    	ExpiresByType text/html "access 28 days"
    	ExpiresByType image/gif "access 28 days"
    	ExpiresByType image/png "access 28 days"
    	ExpiresByType image/jpg "access 28 days"
    	ExpiresByType image/jpeg "access 28 days"
    	ExpiresByType image/webp "access 28 days"
    	ExpiresByType image/x-icon "access 28 days"
    	ExpiresByType application/pdf "access 28 days"
    	ExpiresByType application/javascript "access 28 days"
    	ExpiresByType text/x-javascript "access 28 days"
    	ExpiresByType application/x-shockwave-flash "access 28 days"
    	ExpiresDefault "access 28 days"
    </IfModule>
    
    <IfModule mod_headers.c>
    	<filesMatch "\.(ico|jpe?g|png|gif|webp|swf)$">
    		Header set Cache-Control "public"
    	</filesMatch>
    	<filesMatch "\.(css)$">
    		Header set Cache-Control "public"
    	</filesMatch>
    	<filesMatch "\.(js)$">
    		Header set Cache-Control "private"
    	</filesMatch>
    	<filesMatch "\.(x?html?|php)$">
    		Header set Cache-Control "private, must-revalidate"
    	</filesMatch>
    </IfModule>
    
    #Disable ETag
    FileETag None
    # END WP-Optimize Browser Cache
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Webp & Eliminate render-blocking resources – 2 Questions’ is closed to new replies.