Forums / General Questions / How can I speed up this page?

How can I speed up this page?

Views: 875

Results 1 to 9 of 9
7 Aug 2013, 7:39 PM
#1
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

How can I speed up this page?

Google's Page Speed analysis tool points out that I have several "blocking" javascript files that would be best loaded after the page loads to improve the speed.

They have a small script they suggest inserting in the head of the page to do this.

However, when I look at the html_header.php file in the /common directory, I see several scripts in place for calling all JS files from various directories.

I'm wondering if anyone here has experience and/or code examples that would allow me to load the javascript at the end of the page loading process, rather than the beginning?

I can post the Google Javascript here, if that would helpful and/or if it's allowed.

Thanks,

John

7 Aug 2013, 9:09 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: How can I speed up this page?

Have you assessed how much the "blocking" is actually impacting your site? Or are you just taking Google's automated server's generic report's word for it?

What's the URL?

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

7 Aug 2013, 10:43 PM
#3
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Re: How can I speed up this page?

What - not trust Google? ;)

No, I haven't explored it any deeper than that. Google seemed to think it was significant and I'm not sure how to measure what effect the JS files have. But I'm certainly open to suggestions.

The url I tested was:
http://quinceandco.com/store/index.php?main_page=product_info&cPath=1&products_id=1

8 Aug 2013, 3:44 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: How can I speed up this page?

You're getting an error on your page:

Failed to load resource: the server responded with a status of 403 (Forbidden) http://quinceandco.com/store/includes/templates/quince/css/img/ajax-loader.gif

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

8 Aug 2013, 3:48 AM
#5
drbyte avatar

drbyte

Sensei

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

Re: How can I speed up this page?

And ironically, the slowest-loading resource on that page is your Google Analytics code ... which by the way you're loading twice on the page for no apparent reason.

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

8 Aug 2013, 12:16 PM
#6
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Re: How can I speed up this page?

Hmmm, I'll check into the GA code.

Do you have any idea what would be calling the ajax-loader.gif file? I followed the path you gave me and there is no img directory, so clearly something is missing. I'm thinking if I can find what plugin or component is calling for that, I could at least reload the directory and file.

8 Aug 2013, 1:19 PM
#7
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Re: How can I speed up this page?

OK -- I found what was calling it using the developer toolkit and deleted it for now. Question -- what tool did you use to find that specific error? I probably need to go through this site using some tools like that to find out what else is generating errors. Thanks,

John

8 Aug 2013, 1:58 PM
#8
drbyte avatar

drbyte

Sensei

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

Re: How can I speed up this page?

I just loaded your site in Google Chrome and used its built-in Developer Tools.
The Console showed the image error.
The Network tab shows the waterfall of how long each element takes to load on the page.
The Elements tab shows the names of all the assets being loaded, and mentions the ga.js file twice.
And the basic View Source shows where you're loading the ga.js file twice in the raw HTML being sent to the browser.

If you don't have Chrome installed, you can do the same with Firebug in Firefox. I believe Ajeh suggested that in your other post that you opened last week on the same subject.

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

8 Aug 2013, 2:14 PM
#9
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Re: How can I speed up this page?

Ah yes -- thank you.

John