Boost Up Your Website By Reducing HTTP Requests

Boost Up Your Website By Reducing HTTP Requests

When a user is opening your website every object on the page (e.g. images or scripts) will require a round trip to the server. Those HTTP requests will delay the response time of your site, and if you are loading dozens of objects this delay can add up to several seconds.

Http

The first step to reduce the delay from HTTP requests is to reduce the number of objects on your website. Get rid of unnecessary images, headers, styling features and the like. If possible you can also combine 2 or more adjacent images into a single one.

Secondly make sure that your requests for external files or scripts are combined in a single location. For example instead of using three CSS files to create the layout of your page:

Not Good:

<link rel=”stylesheet” type=”text/css” href=”/body.css” />

<link rel=”stylesheet” type=”text/css” href=”/side.css” />

<link rel=”stylesheet” type=”text/css” href=”/footer.css” />

You should use a single one with all the styling information:

Good:

<link rel=”stylesheet” type=”text/css” href=”/style.css” />

The following two tabs change content below.

Hamza Basharat

Hi. I'm Hamza Basharat, I love to find solutions and help people. I'm a senior writer at TheHelptimes and AboutEngg, and currently studying computer engineering.