Browsers Have Maximum Concurrent Connections to Domain

When designing WEB application you should know that browsers have limited concurrent connections to a domain, it´s done to prevent DDOS attacker. It means that if you have a page with many images the browser will start to download them but will put the request in a queue when hit that limit. The impact is performance.

For better performance you should bundle your css and javascript files, bundle means that you unify many files into one. The background images you should create sprites that unify many images and you can use the background-position to point the correct one.

Another thing to consider is to publish your files in a different server and use a content network delivery (CDN), for example if you request jQuery from cdn.jquery.com, Angular from cdn.angular.com and app.js from your server, if the browser has two maximum concurrent connections only, it won´t need to queue any request because you are using different domains for the files.

Even using all concepts you will have cases where the maximum concurrent connections will be used, for better user usability you can load what is less important for your page using AJAX, this way the user can start using your page while secondary contents are loading.

In this post we discuss how to consider the browser maximum concurrent connections when designing WEB applications.

Anúncios
Browsers Have Maximum Concurrent Connections to Domain

Deixe um comentário

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair /  Alterar )

Foto do Google

Você está comentando utilizando sua conta Google. Sair /  Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair /  Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair /  Alterar )

Conectando a %s