Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Reduce 'Waiting Time' and 'Receiving Time' on Page Load

I am using CloudFront and many time I see Wait Time and Receiving Time is too high.

According to Firebug document, Waiting time and Receiving time means:

Waiting - Waiting for a response from the server

Receiving - / (from cache) Time required to read the entire response from the server (and/or time required to read from cache)

I do not understand why it takes so much time and what I can do to reduce the time?

enter image description here

like image 215
Satya Prakash Avatar asked Oct 05 '13 14:10

Satya Prakash


People also ask

How to reduce the page load time of your website?

In the case of our website, we’ve managed to save 4.6 seconds of page load time! 1. Remove unnecessary WordPress plugins Excessive plugins slow down loading time. But, more importantly, they make your website heavier, which affects its performance. It is strongly recommended that all useless plugins should be uninstalled.

How can I reduce the waiting and receiving time of HTTP?

To generally reduce the waiting and receiving times you may implement some client-side caching, e.g. by setting appropriate HTTP headers like Expires, Cache-Control, etc. Then the browser will only make rather small requests to check whether there are new versions of the data to fetch.

What is the impact of website load time delay?

It decides whether a visitor to your site will explore further, or shall part ways on the first click. A 1-second load time delay leads to 11% fewer page views, 16% decrease in customer satisfaction and 7% loss in conversions. 44% of customers develop a negative image of the company, if its website load time is poor.

How to increase page loading speed?

One of the most important factors affecting the page load speed is image size. It’s also one of the easiest and most effective ways to increase your page loading speed. Designers often worry about the quality of photos and pictures, but they forget that the size can critically impact page loading speed.


2 Answers

Waiting

This means that the browser is waiting for the server to process the request and return the response.

When that time is long, it normally means your server-side script takes long to process the request.

There are many reasons why a server-side script is slow, e.g. a long-running database query, processing of a huge file, deep recursions, etc.

To fix that, you need to optimize your script. Besides optimizing the code itself, a simple way is to reduce the execution time for subsequent requests is to implement some kind of server-side caching.

Receiving

This means the browser is receiving the response from the server.

When that time is long, it either means your network connection is slow or the received data is (too) big.

To reduce this time, you therefore need to improve the network connection and/or to reduce the size of the response.

Reducing the response size can be done by compressing the transferred data e.g. by enabling gzip and/or removing unnecessary characters like spaces from the output before outputting the data. You may also choose a different format for the returned data, where possible, e.g. use JSON instead of XML for data or directly returning HTML.

Generally

To generally reduce the waiting and receiving times you may implement some client-side caching, e.g. by setting appropriate HTTP headers like Expires, Cache-Control, etc. Then the browser will only make rather small requests to check whether there are new versions of the data to fetch.

You can also avoid the requests completely by saving the data on the client side (e.g. by putting it into the local or session storage) instead of fetching it from the server every time you need it.

like image 139
Sebastian Zartner Avatar answered Sep 22 '22 11:09

Sebastian Zartner


There are multiple things you can do.

  1. Set appropriate headers Expires, Cache-control, ETag etc.
  2. Use gzipped versions of the assets
  3. User Sprites where possible. Merge your CSS files into one, merge your JS files into one

Run your site through WebpageTest.org and go through all the recommendations.

Run your site through YSlow and go through all the recommendations

like image 27
Litmus Avatar answered Sep 25 '22 11:09

Litmus