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

Combine Javascript to improve performance

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-23-2011, 09:39 PM
 
BBM_ BBM_ is online now
 

X-Adept
  
Join Date: May 2010
Location: Australia
Posts: 595
 

Default Combine Javascript to improve performance

Hi All,

I was just wondering if anyone has had any success with combining all of their .js files into one and how significant the performance increase was?

I'm looking at combining everything into the common.js file and would appreciate some feedback on those who have completed this.

Thanks.
__________________
Multiple instances of X-cart
Reply With Quote
  #2  
Old 02-25-2011, 10:33 PM
 
BBM_ BBM_ is online now
 

X-Adept
  
Join Date: May 2010
Location: Australia
Posts: 595
 

Default Re: Combine Javascript to improve performance

Hmmmm,

No one has had any success in doing this?
__________________
Multiple instances of X-cart
Reply With Quote
  #3  
Old 02-25-2011, 11:03 PM
 
Shamun Shamun is offline
 

X-Adept
  
Join Date: Jun 2009
Location: North Carolina
Posts: 841
 

Default Re: Combine Javascript to improve performance

The effect of this would vary per site. If you have a bunch of things loading, then all the JS files will start taking up HTTP requests and slow the load time due to waiting. It would also reduce the bandwith overhead of requesting more files but that difference wouldn't be noticed by much.

If you want to combine your javascript, you will need to find out which scripts can be combined so they load in the order they're supposed to. This could become more work than worth depending on how much JS is used and how much traffic you get.
__________________
- Shane Munroe
Reply With Quote
  #4  
Old 02-25-2011, 11:13 PM
 
BBM_ BBM_ is online now
 

X-Adept
  
Join Date: May 2010
Location: Australia
Posts: 595
 

Default Re: Combine Javascript to improve performance

Thanks for the response. I currently have a load time of around 2.1 seconds according to Google, yet there are 10 JS files I would like to reduce these.

I'll have a play on a vm and see what the results are.
__________________
Multiple instances of X-cart
Reply With Quote
  #5  
Old 03-14-2011, 08:02 AM
  isaels@i-artsupplies.co.u's Avatar 
isaels@i-artsupplies.co.u isaels@i-artsupplies.co.u is offline
 

Advanced Member
  
Join Date: May 2010
Posts: 67
 

Default Re: Combine Javascript to improve performance

Im needing to have this done as well but have absolutly no idea how to do it. I think though you only really see a difference if the site gets really busy...
__________________
Paul Wallace

X-Cart Gold 4.3.2
Php5.3.8
MySQL 5.1.56

Backorder/PreOrder
SEO All in one CDSEO
Wholesale Option Pricing
Gift Cert Recovery
Password Recovery
CompanyLogo Alt Tag
Smart Search - ALtered Cart
On Sale - Altered Cart
Sitemap
MM One page checkout
order page emailer

Remember Anomymous Carts
Website CM Speed Opitmisation

iartsupplies.co.uk
Reply With Quote
  #6  
Old 03-18-2011, 08:03 PM
 
BBM_ BBM_ is online now
 

X-Adept
  
Join Date: May 2010
Location: Australia
Posts: 595
 

Default Re: Combine Javascript to improve performance

This is true, I'm just looking at reducing requests on the server
__________________
Multiple instances of X-cart
Reply With Quote
  #7  
Old 03-24-2011, 04:10 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Combine Javascript to improve performance

This feature is available in 4.4.x. So, consider upgrading X-Cart.
Alternatively you can check 4.4.x code and back-port it to 4.x
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
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 02:28 PM.

   

 
X-Cart forums © 2001-2020