Announcement

Collapse
No announcement yet.

Google PageSpeed Tools shows a js and css that need fixing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Google PageSpeed Tools shows a js and css that need fixing

    I am using Miva 9/Iron and Wool... Can someone point me in the right direct to get this fixed. With the JS, is either defer or asynchronously load an option ? If so, how? And how / what do I do to optimize the CSS delivery below?
    Should Fix:

    Eliminate render-blocking JavaScript and CSS in above-the-fold content

    Your page has 1 blocking script resources and 2 blocking CSS 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:
    Optimize CSS Delivery of the following:
    Thank you,
    Terri
    http://www.charmandhammer.com
    Gear for Hard Working Women

    #2
    For all calls to JavaScript files, you can add 'defer' to the end of the script call:
    Code:
    <script src="&mvt:global:clientside_url;Module_Code=mvga&amp;Filename=mvga.js" defer></script>
    To optimize the CSS, you could load the fonts locally and include the @font rules for them in your stylesheet.
    Matt Zimmermann

    Miva Web Developer
    Alchemy Web Development
    https://www.alchemywebdev.com
    Site Development - Maintenance - Consultation

    Miva Certified Developer
    Miva Professional Developer

    https://www.dev4web.net | Twitter

    Comment


      #3
      Thank you Matt, I appreciate your knowledge on this!!
      Thank you,
      Terri
      http://www.charmandhammer.com
      Gear for Hard Working Women

      Comment


        #4
        Note: if you are loading from Google web fonts, its probably not a necessary tasks to use local font source as, at least for the common fonts (i.e., Open Sans, Play bill) there is a good chance that a given user has already cached that file locally and their browser would just skip over that call. In other words, when using tools like PageSpeed, you have to understand that their "corrections" are just suggestions.
        Bruce Golub
        Phosphor Media - "Your Success is our Business"

        Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
        phosphormedia.com

        Comment


          #5
          Thank you Bruce. I was able to increase the load speed score a little.... so it's up to 80/ 89 (mobile/desktop).... optimizing images helped too.
          Last edited by charmandhammer; 09-13-16, 05:01 PM.
          Thank you,
          Terri
          http://www.charmandhammer.com
          Gear for Hard Working Women

          Comment


            #6
            The defer tag made Google PageSpeed Tools happy for the mvga.js script. Can that tag be used for external files too? Such as these:

            ​​​​​​ https://ajax.googleapis.com/ajax/lib.../jquery.min.js
            https://code.jquery.com/jquery-1.11.0.min.js
            https://code.jquery.com/jquery-migrate-1.2.1.min.js
            https://cdn.jsdelivr.net/jquery.slic...7/slick.min.js

            Leslie Kirk
            Miva Certified Developer
            Miva Merchant Specialist since 1997
            Previously of Webs Your Way
            (aka Leslie Nord leslienord)

            Email me: [email protected]
            www.lesliekirk.com

            Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

            Comment


              #7
              Yes, you can use it for any local or third-part scripts like that.
              Matt Zimmermann

              Miva Web Developer
              Alchemy Web Development
              https://www.alchemywebdev.com
              Site Development - Maintenance - Consultation

              Miva Certified Developer
              Miva Professional Developer

              https://www.dev4web.net | Twitter

              Comment


                #8
                I need to let anyone who relies on Goal Tracking in their Goal Conversions, Behavior Pageviews, Sessions in their AdWords campaigns or other revenue type tracking that I may not have checked, that using the 'defer' to the end of the script call KILLS all of this data. While it makes the Google PageSpeed Tools happy, it can really screw with your conversion data.

                It should be noted that I mistakenly assumed that it had been the 9.0006x updates had broken the data:

                http://www.miva.com/forums/forum/onl...9-00063-update
                Leslie Kirk
                Miva Certified Developer
                Miva Merchant Specialist since 1997
                Previously of Webs Your Way
                (aka Leslie Nord leslienord)

                Email me: [email protected]
                www.lesliekirk.com

                Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

                Comment


                  #9
                  [QUOTE=lesliekirk;n686649]I need to let anyone who relies on Goal Tracking in their Goal Conversions, Behavior Pageviews, Sessions in their AdWords campaigns or other revenue type tracking that I may not have checked, that using the 'defer' to the end of the script call KILLS all of this data. While it makes the Google PageSpeed Tools happy, it can really screw with your conversion data.

                  Leslie, I actually used async.... instead of defer .... does async also kill that data?

                  Thank you!

                  Thank you,
                  Terri
                  http://www.charmandhammer.com
                  Gear for Hard Working Women

                  Comment


                    #10
                    Hi, I would like follow up on Leslies input. Defer works fine on local files.



                    [COLOR=rgb(31,73,125)]I had a line from MailChimp that was causing Google comments. I disabled it with good results. As stated in MailChimps documentation..[/COLOR]
                    · http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js

                    [COLOR=rgb(31,73,125)]What version av jquery does Iron and Wool use? Slim version? Does MIVA update includes Jquery?
                    [/COLOR]



                    Best wishes from Stockholm

                    André aka Protos
                    Last edited by Protos; 12-10-16, 03:35 AM.

                    Comment


                      #11
                      Originally posted by Matt Zimmermann View Post
                      For all calls to JavaScript files, you can add 'defer' to the end of the script call:
                      Code:
                      <script src="&mvt:global:clientside_url;Module_Code=mvga&amp;Filename=mvga.js" defer></script>
                      I'm circling back to this because I recently added the defer tag to the mvga.js and the Google Analytics stopped tracking. This seems to be the second time this has happened. So it confirms my previous post.

                      Looks like the question regarding using async hasn't been answered. So, will it?

                      Leslie Kirk
                      Miva Certified Developer
                      Miva Merchant Specialist since 1997
                      Previously of Webs Your Way
                      (aka Leslie Nord leslienord)

                      Email me: [email protected]
                      www.lesliekirk.com

                      Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

                      Comment


                        #12
                        When using analytic scripts, Google recommends ASYNC: https://developers.google.com/analyt...n/analyticsjs/
                        Matt Zimmermann

                        Miva Web Developer
                        Alchemy Web Development
                        https://www.alchemywebdev.com
                        Site Development - Maintenance - Consultation

                        Miva Certified Developer
                        Miva Professional Developer

                        https://www.dev4web.net | Twitter

                        Comment


                          #13
                          So it would be:

                          <script src="&mvt:global:clientside_url;Module_Code=mvga&a mp;Filename=mvga.js" async></script>

                          FWIW - I found the defer tag being used in the Luxe ReadyTheme
                          Leslie Kirk
                          Miva Certified Developer
                          Miva Merchant Specialist since 1997
                          Previously of Webs Your Way
                          (aka Leslie Nord leslienord)

                          Email me: [email protected]
                          www.lesliekirk.com

                          Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

                          Comment


                            #14
                            The only difference is that defer executes the script when the page is completely loaded while async executes the script as soon as it's downloaded. So defer should still be working with analytics, but the page must be completely loaded to see the results.

                            Comment

                            Working...
                            X