If the image I'm serving has the proper HTTP Content-Type is it also required that I have the image filename extension (JPG/PNG/GIF)?
Or can I just include the image in the page without?
|
If the image I'm serving has the proper HTTP Or can I just include the image in the page without? |
|||||||||||||
|
|
If you're providing the correct MIME or content types, then it shouldn't make any difference. I think aesthetically though, it's better to have extensions so that if a user wishes to download an image, their computer won't have any issues opening it, and the user would know off the bat what kind of image it is. (Sometimes you'd get a "image corrupt" error.) For older browsers, this may pose a problem if they are for some reason unable to understand the content types, or if a piece of software (PHP and cURL, "Mike's Marvelous Image Downloader", etc.) does an HTTP request to it, it may not have the same logic that browsers do. Conclusion: stick with extensions. |
|||
|
|