Google PageSpeed Insights score

Discussion in 'HTML & Website Design' started by dipu0076, Feb 7, 2014.

  1. #1
    I did a test with Google PageSpeed Insights, and i do have a bad score due

    1)render-blocking Javascript.
    2)Optimize CSS Delivery


    I have a horizontal menu which uses jquery and as per the goole pagespeed sugesion
    <script async src="my.js"> putting async in the script tag solve the issue of render-blocking Javascript. BUT because the js is not loaded my horizontal menu script is not working.

    So what is the solution for that ?


    and for CSS, The dev. who desing my website was not good in css, and have used almost 70% of unUsed CSS code.

    Is there any tool by which i can just get the used code , because to get 70% unused code is very time consuming process


    Thanks !
     
    dipu0076, Feb 7, 2014 IP
  2. competent123

    competent123 Notable Member

    Messages:
    1,752
    Likes Received:
    71
    Best Answers:
    6
    Trophy Points:
    255
    #2
    css unused code is not the problem

    try minifying the css code, and minifying javascript ( test working of site after EACH minification, do it manually, instead of relying on any 3rd party tool) remember to hard refresh ( ctrl+F5)

    <script src=”demo_defer.js” defer></script> use defer code, as sometimes async doenst' work

    http://www.quickerwordpress.com/step-5/
     
    competent123, Feb 7, 2014 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #3
    I've given up on Google pagespeed as being a bunch of bull. It used to be semi-useful, but lately I've seen it taking pages like the ones I write (typically 70k or less in a dozen or less files) and giving them abysmal scores compared to multi-megabyte massive file-count monstrosities that take ten to a hundred times longer to load... even when their own waterfalls show the smaller page loading 100 times faster!!! You don't get much further up the bs scale than that!

    The render blocking javascript garbage is exactly that; in fact many scripts you place in BODY because they will load and render faster, or even just render cleaner will get you a negative score. They knock off massive parts of the score if you don't use a CDN even if the page is plenty fast from the originating server; suspect when talking about a company that provides CDN's... They also ding you for "unused CSS" when you might be pre-caching subpages, and then give you this idiotic "Optimize CSS delivery" where they talk about putting style back in the markup -- which last I checked is the OPPOSITE of leveraging cache (since then it's not cached if they visit the page when the markup changes) and contrary to the entire reason to even be USING CSS -- admittedly I'm in favor of obsoleting STYLE as a tag and deprecating it as an attribute, neither really has any business in the HTML! with all but the rarest of exceptions of it as an attribute -- like width on a percentage bar, so width is conveying data not presentation...

    That warning you got about the CSS? I'd have to see it and the pages SHARING that CSS to truly weigh in properly, but I suspect that's their tool being a bunch of halfwit broken garbage!

    Worse, they encourage dicking around with cache-control as if the browser defaults are somehow magically 'wrong' -- and even worse than that, they say it's better to extend the cache time on mobile; because I'm SO certain that devices with a fraction the RAM of desktops and semi-unreliable after large amounts of writes flash storage need to be told to long term store more data :(

    Like a lot of google tools -- I'm at the point of giving them a big giant middle finger; they seem more interested in tricking people into using their bloat and helping sweep deep rooted problems with websites under the rug, than providing an actual sane and rational analysis of a sites problems.

    If you're willing to share a link to your site, I could probably give you a far better breakdown of issues than ANY automated tool ever could; always remember the best tool exists between your ears, anything else it's not Scottish.

    Oh, and don't even get me STARTED about their "pagespeed service" -- yeah, they do a real good job of servicing people alright; in the same way Gary Heidnik 'serviced' women.
     
    Last edited: Feb 12, 2014
    deathshadow, Feb 12, 2014 IP