Ramanan
Forum Replies Created
-
Ted,
That wp-content/cache/minify/000000/7a5b6/home.include.54f0f0.js is a concatenation of many JS files.
Your slideshow plugin has some JS which is inline and hence needs other JS to load before.
I think Autoptimize takes care of inline JS as well. May be you can try to use Autoptimize for JS also, not just for CSS.
The other thing you could do is to use Autoptimize itself to do JS optimization (after disabling W3 Total Cache minification for JS). But I haven’t tried that. I use Autoptimize only for CSS.
But with some experiments, you can definitely reach 99 or 100 for both desktop and mobile.
Hmm.
Now it’s getting tougher!
Your plugin seems to have some inline JS code and this is the reason it needs to load jQuery on top.
But although I do not know how to do better, I might experiment a few things.
Such as:
Put back jquery in the JS file management list. Change all file location options to <head> but use non-blocking with defer or other options.
One more thing. When you paste the link for the jquery in the JS file management options, preferably remove everything after the .js part (ie ?ver=1.11.2). This way you don’t have to worry about version changes.
But you might have to do a lot of experiments now.
Oh. I don’t see the error on your site. Even tested pagespeed.
Only see this:
Your page has 2 blocking script resources. This causes a delay in rendering your page.
None of the above-the-fold content on your page could be rendered without waiting for the following resources to load. Try to defer or asynchronously load blocking resources, or inline the critical portions of those resources directly in the HTML.
Remove render-blocking JavaScript:
https://www.westminsterav.com/…-includes/js/jquery/jquery.js?ver=1.11.2
https://www.westminsterav.com/…s/jquery/jquery-migrate.min.js?ver=1.2.1
I guess you must have removed jquery from the list but probably didn’t choose the “Embed before </body>” for other JS file. Make sure you have this option for all the other JS files. Also “Non-blocking using “async” above it.
Oh I see.
Your order should be:
jquery.js?ver=1.11.2
jquery-migrate.min.js?ver=1.2.1
other1.js
other2.js…
Should work.
The problem is that if WordPress changes the version in the next release, you have to change it manually.
Best is to not have the two jquery files in the minify list at all. My site doesn’t use this option for jquery. You can do this by clicking the delete button in “JS file management”. [It of course doesn’t delete jquery, only removes it from the minify list. WordPress will automatically load it]
By the way I don’t see Google fonts on your site now.
Alternatively, you can delete all jquery from the list of files in “JS file management”. (there are two of them).
I personally do that. jquery is already minified and I don’t combine it with other JS files. Google PageSpeed doesn’t mind.
Hi Ted,
I think it’s jquery again.
In the minify tab, first click help and wait for the popup to open. Then see what files are in queue in JS. Make sure the embed location is same for all.
Also check “operation for areas” once you close the popup to see if you have selected the third option “embed before </body>” for every file.
It’s clear your jquery is blocking and not non-blocking while other JS files seem fine and hence W3 Total Cache has two minified files: one on top and one in the footer.
Also remember in the list of JS files, jquery has to be on top because other codes may need jquery.
One thing I noticed is that your site is not requesting fonts from Google. Instead of Open Sans, the font rendered is the default font Arial.
My pleasure.
I am suprised Google font code change didn’t work. I know it really improves the PageSpeed score as the fonts are loaded “asynchronously” and the css isn’t render-blocking. Maybe you can try the code after you’ve improved on other things.
Anyway, all the best. These things are a lot of fun.
“embed before </body>”
for all JS files in the queue.
For Google fonts, I see you are using
@import url(https://fonts.googleapis.com/css?family=Open+Sans)
See if you can remove it. Instead use this:
<script type="text/javascript"> WebFontConfig = { google: { families: [ 'Open+Sans::latin' ] } }; (function() { var wf = document.createElement('script'); wf.src = ('https:' == document.location.protocol ? 'https' : 'http') + '://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js'; wf.type = 'text/javascript'; wf.async = 'true'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(wf, s); })(); </script>
Also for JS,
In W3 Total Cache, Minify tab, under JS file management, under embed location, choose the third option “embed before </body>”
I don’t know how to handle this Soliloquy files. You can ask this in Autoptimize’s support. The author replies to all posts usually.
I don’t know how to handle the “prioritize visible content”. It’s perhaps conneceted to Soliloquy.
Hi Ted,
I think your javascript is doing fine except I don’t know why your jquery is being minified twice.
Check the files under “JS file management”. Do you see jquery twice?
In the last column, you may choose “Embed before </body>” FOR ALL. (But test this by visiting your site and seeing if everything works fine.)
Also under “JS minify settings”, choose “non-blocking using async at all the 3 places”.
You should first solve JS as CSS is more complicated for optimizing.
What options for CSS did you choose in Autoptimize? Did you just install and check one option for CSS or did you click “show advanced options” and select a few?
Something strange happening to your jquery. It is loaded twice.
https://www.westminsterav.com/…s/jquery/jquery-migrate.min.js?ver=1.2.1
https://www.westminsterav.com/…000/7a5b6/default.include-body.5af54d.jsare both jquery.
I think you are doing minification in a strange way.
Use “help” in the Minify tab. It’ll list the JS files loaded by your site.
Choose the option Non-blocking with any of the options which work best. Preferably merge them in one file. This can be achieved by choosing one embed location for all. Be careful of dependencies. So jquery has to be on top.
For CSS, you can use the plugin Autoptimize. (Uncheck W3 Total Cache CSS minification). In Autoptimize, use the inline and defer. Some reading is required to understand this.
Forum: Plugins
In reply to: [Page Speed Optimization] Minify IssuesI think you have an issue.
Your current version runs before W3TC. So what happens is that your plugin inserts inline CSS and enqueues unminified theme CSS files. After your plugin runs, W3TC with CSS minification on puts the minified CSS on top.
But if you run your plugin after W3TC, it is unable to do create static HTML files. I believe your first version had this problem.
Do you have a demo site, where I can see CSS minification created by W3TC plus inlining done via your plugin running successfully?
Forum: Plugins
In reply to: [Autoptimize] Feature Request: Load HTML head before inline CSSOh that’s a different thing.
If I change it, the CSS is inserted after.
What I am asking is this: I have a few code lines which go in the head. I want the sequence:
Original Head
Inline CSS
Body.