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

Website too slow

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #21  
Old 05-15-2013, 09:25 AM
  bigredseo's Avatar 
bigredseo bigredseo is offline
 

X-Man
  
Join Date: Oct 2002
Location: Omaha, NE, USA
Posts: 2,364
 

Default Re: Website too slow

The extra step integration into X-Cart I'm not too familiar with unfortunately. I've performed the steps in our own website but it's a Wordpress website and integrated using that.

With regards to the various subdomains - you can see them on our website as http://cdn1.handsonwebhosting.com up through cdn6
We then call all CSS calls from css.handsonwebhosting.com

I guess, using some creativity and programming, you could setup say 6 subdomains (cdn1, cdn2, cdn3 etc) and then making the system choose at random to pick from 1, 2 or 3 on each call. It would definitely require more overhead computer power though.

Here's an output of how the CNAME for the different subdomains would look- http://www.digwebinterface.com/?hostnames=handsonwebhosting.com%0D%0Acdn2.handson webhosting.com%0D%0Acdn...4&nameservers=
__________________
Conor Treacy - Big Red SEO - @bigredseo
Search Engine Optimization & Internet Marketing - We Bring Your Website Out Of Hiding!
If you can't be found on Google, Bing or Yahoo, you pretty much don't exist on the Internet.
Omaha SEO Office with National & Local SEO Services
Hourly Consulting - great for SEO Disaster Recovery, Audits and DIY Guidance
Reply With Quote

The following user thanks bigredseo for this useful post:
DavyMac (05-15-2013)
  #22  
Old 08-11-2013, 05:19 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Website too slow

Hi Conor (and everyone),

My page load is getting better and better -- with the new VPS running SSD storage, the bottlenecks at the hardware are all but eliminated. Google pagespeed for home page is 94! Almost there...

I am using this technique to set header caching (as described in the Hands-on help file:
https://billing.handsonwebhosting.com/knowledgebase.php?action=displayarticle&id=294

ExpiresActive On
ExpiresByType image/gif A29030400
ExpiresByType image/png A2419200
ExpiresByType image/jpg A29030400
ExpiresByType image/x-icon A29030400
ExpiresByType application/pdf A2592000
ExpiresByType application/x-javascript A604800
ExpiresByType text/plain A2419200
ExpiresByType text/css A604800

But there are two js cache files not getting their headers set...

Code:
Leverage browser caching of static assets: 56/100 FAILED - (No max-age or expires) - http://cdn.domain.com/var/cache/1.bab2d500e39174a1c1761b556d4cf94f.js FAILED - (No max-age or expires) - http://cdn.domain.com/var/cache/2.ab3e3d778d98b7f08bb365608526cf07.js

Any idea what could be preventing the js files coming from the cdn to have the expires headers not set by htaccess directives?

Could it be that x-cart is not setting the file type correctly?
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #23  
Old 08-11-2013, 10:02 AM
  Vacman's Avatar 
Vacman Vacman is offline
 

X-Adept
  
Join Date: Sep 2005
Location: Torrance, CA
Posts: 792
 

Default Re: Website too slow

Nice tip on the header cache. Are those the settings you are using "ExpiresByType"?

If so, I wonder what happens if you change one of the images (re-upload), etc?
__________________
Carl Tice

X-Cart 4.6.6
X-Payments 3.0
ReBOOT 3.4.1

PHP 5.6.30
MySQL 5.6.35
Linux 2.6.32-042stab120.18
ionCube PHP Loader v4.7.3
Perl 5.10.1
Reply With Quote
  #24  
Old 08-11-2013, 10:16 AM
  bigredseo's Avatar 
bigredseo bigredseo is offline
 

X-Man
  
Join Date: Oct 2002
Location: Omaha, NE, USA
Posts: 2,364
 

Default Re: Website too slow

I'm guessing that since the JS isn't getting accepted by the expires types, that's where the issue sits.

Try adding this to the bottom:


Code:
<filesmatch "\.(js)$"=""> ExpiresDefault A43200 </filesmatch>

43200 is 12 hours... (seconds x minutes x hours) 60*60*12=43200 seconds

So instead of a ExpiresByType, we're using an "FilesMatch". See if that helps resolve the issue.

The other idea would be to log into your control panel with your CDN and see if they have a section to allow you to add files or directories to a Custom File List. Possibly you can set from in there and it would set the headers on their end.

I've also seen the ExpiresByType set to the following:

Code:
ExpiresByType text/javascript A43200
So rather than being an "application/x-javascript" the type is "text/javascript". See if that makes a difference. I know it used to work the other way when I wrote the article, but maybe things have changed in newer browser versions.
__________________
Conor Treacy - Big Red SEO - @bigredseo
Search Engine Optimization & Internet Marketing - We Bring Your Website Out Of Hiding!
If you can't be found on Google, Bing or Yahoo, you pretty much don't exist on the Internet.
Omaha SEO Office with National & Local SEO Services
Hourly Consulting - great for SEO Disaster Recovery, Audits and DIY Guidance
Reply With Quote

The following user thanks bigredseo for this useful post:
carpeperdiem (08-11-2013)
  #25  
Old 08-11-2013, 06:06 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Website too slow

Quote:
Originally Posted by handsonwebhosting
Try adding this to the bottom:


Code:
<filesmatch "\.(js)$"=""> ExpiresDefault A43200 </filesmatch>
Server error.
Quote:
ExpiresByType text/javascript A43200
Didn;t work.

I'll reach out to MaxCDN as suggested, and report back.

Thanks!
J
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #26  
Old 08-13-2013, 10:22 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Website too slow

Just noticed that the cached js files also fail the header caching if https, and NOT coming from cdn (I have the cdn set to only grab http, and not https):

Quote:
Leverage browser caching of static assets: 73/100
FAILED - (No max-age or expires) - https://www.domain.com/var/cache/1.d571e9300a96df62e63bf55f6e57eb42.js
FAILED - (No max-age or expires) - https://www.domain.com/var/cache/2.ab3e3d778d98b7f08bb365608526cf07.js

SO this is not cdn related.
Hmm...
Any other ideas?
thanks,

J
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #27  
Old 08-13-2013, 10:39 AM
 
DavyMac DavyMac is offline
 

eXpert
  
Join Date: Apr 2007
Location: Poole, UK
Posts: 333
 

Default Re: Website too slow

Quote:
Originally Posted by carpeperdiem
Any other ideas?
thanks,

J

Personally I use
Code:
ExpiresByType application/javascript "access plus 1 month"
__________________
X-Cart GOLD Plus v4.5.4
CDSEO Pro
ewdhosting Dedicated Server
Dedicated SSL
Stone Edge OM
Reply With Quote

The following user thanks DavyMac for this useful post:
carpeperdiem (08-13-2013)
  #28  
Old 08-13-2013, 10:46 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Website too slow

Quote:
Originally Posted by DavyMac
Personally I use
Code:
ExpiresByType application/javascript "access plus 1 month"

Bingo.
Thanks!

Can you share your entire ExpiresByType, if you don't mind?

Thanks!
J
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote

The following user thanks carpeperdiem for this useful post:
DavyMac (08-13-2013)
  #29  
Old 08-13-2013, 10:55 AM
 
DavyMac DavyMac is offline
 

eXpert
  
Join Date: Apr 2007
Location: Poole, UK
Posts: 333
 

Default Re: Website too slow

Quote:
Originally Posted by carpeperdiem
Bingo.
Thanks!

Can you share your entire ExpiresByType, if you don't mind?

Thanks!
J

That's great! pleased I could help.

Here is my Leverage browser caching:
Code:
ExpiresActive On ExpiresByType image/jpg "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType image/gif "access plus 1 month" ExpiresByType text/css "access plus 1 month" ExpiresByType text/html "access plus 1 month" ExpiresByType application/x-javascript "access plus 1 month" ExpiresByType application/javascript "access plus 1 month"

I've noticed that I don't cater for pdf's, so I'll need to sort that out.
__________________
X-Cart GOLD Plus v4.5.4
CDSEO Pro
ewdhosting Dedicated Server
Dedicated SSL
Stone Edge OM
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:42 PM.

   

 
X-Cart forums © 2001-2020