Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17
  1. #11
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Responsive Classic Template BLINKS when clicking links

    Yours blinks too, kobra ...
    I guess it does....
    Zen-Venom Get Bitten

  2. #12
    Join Date
    Jan 2004
    Posts
    66,419
    Blog Entries
    7
    Plugin Contributions
    277

    Default Re: Responsive Classic Template BLINKS when clicking links

    Quote Originally Posted by rbarbour View Post
    Allot of the "blinking" has to do with render-blocking JavaScript and CSS in above-the-fold content.

    I first noticed this when jQuery CDN was added to the html_header.php

    Just my opinion
    Ray, do you have a suggestion for fixing that?
    The jquery CDN was put in html_header in order to allow the zillion other plugins that dump jquery-dependent mods into the top or body of the page, instead of waiting for them to load in the footer.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #13
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Responsive Classic Template BLINKS when clicking links

    Chris,

    Where jQuery CDN is fine in the html_header, it should be included as Asynchronous JavaScript though.

    Sometimes simple is better!

    Code:
    <script type="text/javascript" async src="//code.jquery.com/jquery-1.12.0.min.js"></script>
    
    <script type="text/javascript" async src="<?php echo $template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript'); ?>/jquery.min.js"></script>
    Note: asynchronous scripts should not use document.write

    Adding the async keyword to the script tag tells the browser that it should not block the DOM construction while it waits for the script to become available - this is a huge performance win!

    Quote Originally Posted by DrByte View Post
    Ray, do you have a suggestion for fixing that?
    The jquery CDN was put in html_header in order to allow the zillion other plugins that dump jquery-dependent mods into the top or body of the page, instead of waiting for them to load in the footer.

  4. #14
    Join Date
    Jan 2004
    Posts
    66,419
    Blog Entries
    7
    Plugin Contributions
    277

    Default Re: Responsive Classic Template BLINKS when clicking links

    So then a jquery plugin that's loaded without the 'async' attribute will still run into problems though, right? (or, at least if the async call to the jquery CDN hasn't finished loading yet)
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #15
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Responsive Classic Template BLINKS when clicking links

    Correct



    Quote Originally Posted by DrByte View Post
    So then a jquery plugin that's loaded without the 'async' attribute will still run into problems though, right? (or, at least if the async call to the jquery CDN hasn't finished loading yet)

  6. #16
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,364
    Plugin Contributions
    94

    Default Re: Responsive Classic Template BLINKS when clicking links

    So, what's the choice in this scenario for a plugin that needs jQuery? Should the plugin load its jQuery bit with the async attribute as well?

  7. #17
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Responsive Classic Template BLINKS when clicking links

    Honestly,

    I'll have to look at this more, the solution provided works and prevents the blank or "blink" before page loads but it isn't a solution for the vast majority and will require all jscript to include that attribute.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v155 Responsive Classic vs Responsive Sheffield Blue vs ?
    By Zean in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 13 May 2016, 07:01 AM
  2. v151 Responsive Classic Contemporary Silver Template for 1.5.x
    By rbarbour in forum Addon Templates
    Replies: 28
    Last Post: 19 Feb 2016, 04:04 PM
  3. Help with Responsive All Business Template Links
    By StevenUK in forum General Questions
    Replies: 6
    Last Post: 9 Dec 2015, 04:24 PM
  4. Page delay when clicking some links
    By alexismya in forum General Questions
    Replies: 6
    Last Post: 14 Jul 2011, 04:03 PM
  5. Double url's when clicking links
    By Callan in forum General Questions
    Replies: 7
    Last Post: 15 Nov 2007, 01:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR