I'm testing the speed of my CDN network by directly browsing to the addresses of images that are stored on it. Some of these images are in jpg
format while others are in jpeg
format.
I've noticed that when i browse the address of a jpg
file the image is always displayed by default. When i check the network
tab of the inspect
menu in google chrome
or similar browsers i also see that the response is always displayed under the response type img
. However when its a jpeg
file the browser always downloads it as a document by default and the response can only be found under the doc
response type. So the browser doesn't treat it as an image at all, even though it is.
So why is this the case? Aren't jpg
and jpeg
pretty much the same thing?
jpeg
files to bejpg
, then try loading it through the CDN again. If the browser displays it normally as ajpg
, that would confirm my suspicion that it's not about the file itself, it's about the server software (the CDN's built-in software) reading the file extensions and serving them up with different HTTP headers. Perhaps it knows it needs to servejpg
"as an image", but just seesjpeg
as a generic "file". If so, it may be a mime-type thing..jpg
and this was long ago. There is really no reason today to continue doing that.