Zen Cart Logo
Forums / Upgrading to 1.5.x / Responsive Classic Template BLINKS when clicking links

Responsive Classic Template BLINKS when clicking links

Views: 2,149

Results 1 to 17 of 17
30 Mar 2016, 6:29 PM
#1
chadderuski avatar

chadderuski

Totally Zenned

Join Date:
Apr 2006
Location:
Dark Side of the Moon
Posts:
986
Plugin Contributions:
0

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!

30 Mar 2016, 6:46 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

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

30 Mar 2016, 6:51 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Responsive Classic Template BLINKS when clicking links

Yours blinks too, kobra ... :lookaroun

30 Mar 2016, 6:53 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Responsive Classic Template BLINKS when clicking links

NOTE: blinks appear to happen in FireFox and Chrome ... so far not seeing them in IE

30 Mar 2016, 6:57 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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 ...

30 Mar 2016, 7:02 PM
#6
chadderuski avatar

chadderuski

Totally Zenned

Join Date:
Apr 2006
Location:
Dark Side of the Moon
Posts:
986
Plugin Contributions:
0

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

30 Mar 2016, 7:04 PM
#7
chadderuski avatar

chadderuski

Totally Zenned

Join Date:
Apr 2006
Location:
Dark Side of the Moon
Posts:
986
Plugin Contributions:
0

Re: Responsive Classic Template BLINKS when clicking links

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?

30 Mar 2016, 7:06 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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 ...

30 Mar 2016, 7:12 PM
#9
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Responsive Classic Template BLINKS when clicking links

hahahahaha ... I suppose "real" is a dedicated box?
No - Shared hosting on a real server not VPS

30 Mar 2016, 7:25 PM
#10
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

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

30 Mar 2016, 7:30 PM
#11
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Responsive Classic Template BLINKS when clicking links

Yours blinks too, kobra ...
I guess it does....

30 Mar 2016, 8:50 PM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Responsive Classic Template BLINKS when clicking links

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.

30 Mar 2016, 9:33 PM
#13
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

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!

<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!

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.

30 Mar 2016, 9:48 PM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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)

30 Mar 2016, 10:14 PM
#15
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Responsive Classic Template BLINKS when clicking links

Correct

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)

30 Mar 2016, 11:12 PM
#16
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,085
Plugin Contributions:
56

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?

31 Mar 2016, 2:01 AM
#17
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

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.