Tutorial :will the use of multiple subdomains speed up my website?


i am considering moving my images to a subdomain on my website, and i read somewhere that moving the script to a different one would make it even faster! is it really true? or should i just leave it at what it is if i am not considering a real CDN?


Yes and no. The site itself won't be faster, but it may load faster in most browsers and thereby it may seem faster.

The reason is that most browsers limit themselves to a set maximum of concurrent connections to a domain. Say you have your site on www.mysite.com. Now when your browser tries to download your html, css, scripts and images it may need to download 20-30 files from the server. Since the browser limits itself to, say 4, concurrent connections to your domain the browser will have to download only 4 files at one time.

Now if you serve your css files on a separate subdomain css.mysite.com, your images on images.mysite.com and scripts on scripts.mysite.com your browser can open 4 concurrent connections to each of the domains. Hence it can download up to 16 files at the same time. If your banwidth allows it this may cause the page to load faster.

So your site may appear to be faster for the visitor, but the reason will be loading times, not any speedup of code or database access.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »