Check if a page is caching with curl

Open the terminal and type the following curl command with the desired site/page:

 curl -Ik

We can see that is caching.

Let’s see an example where a site is not caching

 curl -Ik

curl -I:
-I, –head

(HTTP FTP FILE) Fetch the headers only! HTTP-servers feature the command HEAD which this uses to get nothing but the header of a document. When used on an FTP or FILE file, curl displays the file size and last modification time only.


curl -I

See for more information.

Another Curl command: