Jump to content

slow site... Create sub-domains for Javascript files and CSS files ? ...slow site


Recommended Posts

Hello,

 

Lately I saw a nice aricle about 10 best tips to speed up your site. Because my site is gettlng since a couple aof weeks very slow.

 

article link:

http://www.prestashop.com/blog/en/10-best-tips-to-speed-up-your-prestashop-store-3/

 

I

- deleted all unnassery modules

- performanced settings are ok

 

Now I would like to create subdomains like

5. Create sub-domains for Javascript files and CSS files

  1. Create a sub-domain js1.mystore.com and ask your hosting provider to direct it to /js/
  2. Create a sub-domain js2.mystore.com and ask your hosting provider to direct it to /theme/mytheme/js/
  3. Create a sub-domain css1.mystore.com and ask your hosting provider to direct it to /css/
  4. Create a sub-domain css2.mystore.com and ask your hosting provider to direct it to /theme/mytheme/css/

These 4 sub-domains will allow your visitors to load more files at the same time. Basically, a web-browser is limited to 8 parallel downloads. Each sub-domain is adding 8 new parallel downloads, so the total would be 40 (Main domain + 4 sub-domains).

 

I know how to ceate it in the CPANEL but is there something else I am missing ? Or exists a good article /topic about his ??

 

I had contact with my host about the speed of my site and recommanded me a CVS server..., but reading about it in topics it doenst convience me because 4 months ago I had an average of 2sec loading time...

 

any recomandation welcome !

 

Thankx in advance

david

www.to2bebe.com

Link to comment
Share on other sites

There are side effects to this approach that should be noted up front.

 

First, you are introducing extra DNS lookups which may or may not slow things down (they certainly will not speed anything up though). Second, if all of these domains are hosted on the same server you are potentially causing each visitor to open far more simultaneous HTTP connections which are not inexhaustible (there will be a predefined limit based on server configuration). Each connection represents disk activity, memory usage, processor usage, etc. so the more that happen at once the less number of clients can be served at one time.

 

This approach makes more sense if the files are hosted on seperate servers though for the Javascript you might run into cross-domain issues if you go that route.

 

Cheers

  • Like 2
Link to comment
Share on other sites

  • 4 weeks later...

Did somebody know how to configure this CCC functionality?

I've created new subdomain ex. static-js.xxx.com and static-css.xxx.com -> I've typed it to "mediaservers - CDN" -> I've also make redirection in cpanel: ex. static-js.xxx.com -> xxx.com/themes/my_theme/js

 

Presta try to load content from this 2 extra mediaservers, but load all content ~50% from static-js and other 50% from second static-css subdomain.

 

How to load all js files from js-static; css from css-static & other things from main domain??

What code or something I've to add / which code have to change?

 

Somebody have solution to load one-kind content from exact subdomain/CDN server?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...