Responsive Classic Template BLINKS when clicking links
Hiya,
Been trying out 155. Fresh install, imported products from live site. PHP 5.6.19, MySQL 5.5.29 running on capable VPS.
When I navigate around the website, or am clicking "Next" between products, I have the entire page go "BLANK" randomly between clicks. Give the impression that the whole page "BLINKS" out before refreshing. This happens about every 3rd or 4th click, but sometime sooner too.
My live site doesn't do that. Granted, it's running 1.3.9 that I put a lot of effort into optimizing, but I never get
this blinking effect when clicking any link.
It's running on an unused IP at the moment instead of a domain name. That shouldn't matter, right?
Ideas?
Thanks!
Re: Responsive Classic Template BLINKS when clicking links
Don't know your VPS specs but here is a stock ZenCart v1.5.5 install on a real server you can test HERE
Re: Responsive Classic Template BLINKS when clicking links
Yours blinks too, kobra ... :lookaroun
Re: Responsive Classic Template BLINKS when clicking links
NOTE: blinks appear to happen in FireFox and Chrome ... so far not seeing them in IE
Re: Responsive Classic Template BLINKS when clicking links
Never mind, blinks in IE if you do more hits like browsing through product_info pages as in NEXT through it ...
Re: Responsive Classic Template BLINKS when clicking links
ah, yes. forgot to add this is on firefox 43.0.1 OS X 10.6.8
Re: Responsive Classic Template BLINKS when clicking links
Quote:
Originally Posted by
kobra
Don't know your VPS specs but here is a stock ZenCart v1.5.5 install on a real server you can test
HERE
hahahahaha ... I suppose "real" is a dedicated box?
Re: Responsive Classic Template BLINKS when clicking links
NOTE: amazon and bestbuy etc all blink technically speaking ... just not always as noticable on bigger servers ...
Re: Responsive Classic Template BLINKS when clicking links
Quote:
hahahahaha ... I suppose "real" is a dedicated box?
No - Shared hosting on a real server not VPS
Re: Responsive Classic Template BLINKS when clicking links
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
Re: Responsive Classic Template BLINKS when clicking links
Quote:
Yours blinks too, kobra ...
I guess it does....
Re: Responsive Classic Template BLINKS when clicking links
Quote:
Originally Posted by
rbarbour
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.
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
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.
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)
Re: Responsive Classic Template BLINKS when clicking links
Correct
Quote:
Originally Posted by
DrByte
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)
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?
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.