Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Moving Javascript to the Bottom to Increase Speed?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-07-2012, 04:02 AM
 
salsabeel salsabeel is offline
 

Senior Member
  
Join Date: Jan 2004
Posts: 132
 

Default Moving Javascript to the Bottom to Increase Speed?

Hello,

Has anyone moved Javascript to the bottom of the page before </BODY> to reduce the site's load time? What were the results?

I used YSlow on our site and found this recommendation. From Yahoo's documentation: Put Scripts at the Bottom.
__________________
X-Cart Platinum 4.6.5
Reply With Quote
  #2  
Old 03-07-2012, 06:34 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Moving Javascript to the Bottom to Increase Speed?

No I haven't. But X-cart already speeds up javascript downloads by combining a lot of the different scripts into one file. If you are wanting to increase your speed, first look at your web hosting company. I like to preach about switching to Hard Hat or one of the other X-cart hosts, EWD or Hands On.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #3  
Old 03-18-2012, 06:44 AM
 
salsabeel salsabeel is offline
 

Senior Member
  
Join Date: Jan 2004
Posts: 132
 

Default Re: Moving Javascript to the Bottom to Increase Speed?

Mike,

Thanks for your advice. Do you have any experience with Hard Hat Hosting's VPS Beginner Plan? We were actually with them from 2006-2007 on the VPS Commerce Plan and were very satisfied, but had to switch to a different host to try to reduce fees at the time. My main concern is will the VPS Beginner Plan support X-Cart's memory requirements.

As far as the Javascript's location, I noticed that X-Cart 4.4.5 now moves JS and CSS to the bottom of the page on its own. In customer/home.tpl lines 53-54, there is:

Code:
{load_defer_code type="js"} {load_defer_code type="css"}

Thanks again!
__________________
X-Cart Platinum 4.6.5
Reply With Quote
  #4  
Old 03-18-2012, 06:48 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Moving Javascript to the Bottom to Increase Speed?

The VPS beginner plan will definitely have enough juice to run X-cart. I highly recommend it. Larger stores with lots of traffic are going to want a bigger package, but they can afford it.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:50 PM.

   

 
X-Cart forums © 2001-2020