I first downloaded two images.
Put them into /usr/share/nginx/html/img
directory.
One was named pic-1.jpg, another was named pic-2.jpg.
Remember, I've not added any cache control headers till date.
Now, I went to my-ip-address:80/img/pic-1.jpg
. Then I clicked reload a couple of times, so that I can check dev tools and find cache stored there.
But to my surprise, I didn't find anything stored there.
# curl -I 192.168.1.76:80/img/pic1.jpg
HTTP/1.1 200 OK
Server: nginx/1.20.1
Date: Fri, 01 Sep 2023 09:32:26 GMT
Content-Type: image/jpeg
Content-Length: 164619
Last-Modified: Fri, 01 Sep 2023 09:30:40 GMT
Connection: keep-alive
ETag: "64f1af40-2830b"
Accept-Ranges: bytes
This was the output being returned via terminal curl
.
Above is the output in chrome dev tools. My expectation is that it should be cached as long as I've not specified to not cache it. Why is it not being cached?
Mind you that about:cache didn't open, so I had to use this chrome dev tools.
And decided to use it. I expect a key-value store of the image there.