get pageload time using command line - linux

Ankit Agarwal picture Ankit Agarwal · Sep 29, 2014 · Viewed 9k times · Source

I am stuck with a problem. I have list of 10 URL. I need to calculate the page load time.

I am presently using curl for getting the page load time:

time curl www.growingcraft.com

Second method:

wget www.growingcraft.com

The problem is that, this gives me the time taken to download the page, but :

  1. Does this file also includes the Javascript, css and images time?
  2. What is there are some external reference to some images (as in this case). How to calculate the time taken to load those images?

Is there any other way I can calculate page load time in Linux which will be more effective/accurate?

Answer

Dagg Nabbit picture Dagg Nabbit · Sep 29, 2014

Try this:

time wget -pq --no-cache --delete-after www.growingcraft.com 

-p makes it download all the resources (images, scripts, etc.)

-q makes it quiet.

The other options should be self-explanatory.