Whenever you request for a webpage, browser makes HTTP request for external resources like Javascript, CSS, Images and any other resource files associated with requested webpage and most of repose time spent on downloading these external resource.
Approximately 70% visitors to your website visit only homepage ( top landing page). but as developer point of view we consider homepage as any other page of website. and we include all javascript and css file which are require for whole website. therefor it increases the HTTP request and hence the page load time.
Approximately 70% visitors to your website visit only homepage ( top landing page). but as developer point of view we consider homepage as any other page of website. and we include all javascript and css file which are require for whole website. therefor it increases the HTTP request and hence the page load time.
How to reduce HTTP requests?
- Include only those external resources which are require for requested webpage. i.e. for homepage, include resource which are required for homepage only.
- Combine different CSS file content into one CSS file.
- Combine different Javascript file contents into one Javascript file.
- Use image sprite instead of different images. it will reduce the most of HTTP request.
- Use Cache-Header to reduce HTTP request.
For better performance try to find the external resources which are not required for requested page and remove those resource from the webpage.
Use Cache-Header settings to reduce HTTP request. browser cache the external resource and won't make request for cached files for next request.
If you have number of inline images in the HTML then try to show only single default image in each inline image and load remaining images in page load event. it will improved user response time.
You can use lazyload jQuery plugin to achieve this goal.
Remember every time, site with few HTTP request will perform well and increase user satisfactions.
No comments:
Post a Comment