X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Website too slow (https://forum.x-cart.com/showthread.php?t=66582)

bigredseo 05-15-2013 09:25 AM

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=

carpeperdiem 08-11-2013 05:19 AM

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?

Vacman 08-11-2013 10:02 AM

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?

bigredseo 08-11-2013 10:16 AM

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.

carpeperdiem 08-11-2013 06:06 PM

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

carpeperdiem 08-13-2013 10:22 AM

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

DavyMac 08-13-2013 10:39 AM

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"

carpeperdiem 08-13-2013 10:46 AM

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

DavyMac 08-13-2013 10:55 AM

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.


All times are GMT -8. The time now is 08:52 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.