wpmhweb
Forum Replies Created
-
Forum: Plugins
In reply to: [Autoptimize] How to fix JetPack and Autoptimize script loading problem@optimizingmatters I ended up using JetPack Boost for the JS and Critical CSS, and Autoptimize for minimizing CSS to fix the problem.
@chriscct7 Ok, but what’s going to happen on sites that already implemented the workaround?
Thanks,@vmarko the .htaccess does not have any TTL configuration. StackPath has the browser cache ttl set to 60 days, and cache handling Lifetime to Origin Controlled. And the W3TC as previously shown above.
Could it be the VPS DNS records? I mean the NS and A records? The A is set for 3660 and the NS is set to 1800.@vmarko I understand that external sources can not be handled, but I have several files coming from the site that has a low TTL.
Here’s an example:
` Serve static assets with an efficient cache policy 56 resources found …jquery/jquery.min.js(i3g4v6w8.stackpathcdn.com) 34 m 46 s 30 KiB …css/autoptimize_single_92f5cdb….css?ver=5.6.3(i3g4v6w8.stackpathcdn.com) 34 m 46 s 24 KiB …css/autoptimize_single_c0bb895….css?ver=9.3.1(i3g4v6w8.stackpathcdn.com) 34 m 46 s 14 KiB …jquery/jquery-migrate.min.js(i3g4v6w8.stackpathcdn.com) 34 m 46 s 4 KiB …related-posts/related-posts.min.js(i3g4v6w8.stackpathcdn.com) 34 m 46 s 2 KiB`
the browser cache settings of w3tc, I have these settings:
CSS & JS is set to 31536000 seconds
HTML & XML is et to 3600 seconds
Media & other files is set to 31536000 secondsSeeing these configurations, I don’t how to determine what setting w3tc is using for the above files, since we are talking about js and css files, and Google lighthouse shows one-hour ttl and w3tc appears to be using one-year ttl.
@optimizingmatters when I use Boost and Autoptimize, yes. I have tried the combination of “Aggregate CSS-files?” with and without “Also aggregate inline CSS?”. The only way JetPack Boost critical css works is with Autoptimize “Optimize CSS Code?” and with “Inline and Defer CSS?” enabled.
@optimizingmatters The only way it works is with “Optimize CSS Code?” and with “Inline and Defer CSS?” enabled. However, this means that I have multiple CSS files, which is not the optimal solution. Can you look into it and update the plugin so we can aggregate the css files?
Thanks,@optimizingmatters well, it does not work with or without the “also aggregate inline CSS” since the CSS will break on the site, making the page look with missing css styles.
@bobmatyas I used the Chrome Dev Tools Lighthouse. I’m also using StackPath CDN.
What are the optimal settings I could use in W3TC minify settings to make it work?- This reply was modified 5 years, 3 months ago by wpmhweb.
Chrome dev tools lighthouse that’s what I used.
@drawmyface
I’m aware Boost doesn’t minify files. I’m using W3TC to minify, but when I use the WETC plugin it moves the modification file at the top of the page and it would appear that JetPack boost doesn’t know it exists, because the Google Analysis tool will show that the page has CSS rendering blocking. But if I disabled the W3TC minify feature, boost works correctly and Google doesn’t complain about CSS render-blocking again.Another thing I notice is that Boost appends onload=”this.media=’all'” to the css files, but when I’m using W3TC the minify CSS file doesn’t show onload=”this.media=’all'” in the HTML code.
@pyronaur sweet.
Thanks for the reply. Thus far, things seem to be working ok. Just as a comment, how about having the option to allow entering the links for posts with different layouts, so the plugin knows what to look for more accurately?
Thanks,@davidlonjonxwp note: I tried to add the ‘boost’ string in the list of ‘Ignored comment stems’ in their settings but it didn’t make a difference.
@davidlonjonxwp When using the W3 Total Cache minify feature, JetPack Boost no longer works as expected because rendering blocking returns and I notice that the minify file for the site does contain the onload=”this.media=’all'” information.
Ok, so I just tested, and when I use the minify feature in W3 Total Cache, the JetPack Boost does not work as expected and checking with Google tools the render-blocking will return, even after regenerating the critical CSS.
How do I minify the CSS on the website when using JetPack Boost?