Hello, Google Insights https://developers.google.com/speed/pagespeed/insights/ advices this: so i editted my code so its now: But after retesting, google still complaints, any idea please?
Hi Postcd. If I'm not mistaken, that means to put that jQuery CDN to the end of your HTML content block... so it would be the last to be rendered. So putting it just before the closing </body> tag will make Google happy, I think
Yeah, that Async attribute really doesn't do **** in most browsers anyways, and anyone telling you otherwise doesn't know ****. @hdewantara has it right in that you should move it to the end of the document, or at the very least into BODY. Any GOOD scripting should be attaching itself after that point -- but beware that you might have some poorly written scripts (pretty much a given once that steaming pile of halfwit bloated maggot ridden garbage known as jQuery is in the picture) that will require jQuery to load before they can run -- in which case either get rid of that stupid malfing jQuery nonsense, or move it into the start of BODY. Also, beware that moving it CAN result in slower pageloads -- the opposite of what Google tells you. It's good practice to move it, but don't trust it. Try it both ways, and test yourself using the waterfalls in tools like FireBug or Dragonfly. A LOT of what automated tools like pageSpeed tells you can actually be the opposite of what you need to do, as like a lot of automated tools they try to be a "one size fits all" solution -- and when you do that you end up jack of all trades, but master of none. In fact, there are a few things it says that are outright bullshit if you have a well written site; but to their credit most websites aren't well written.