.html is informally
understood to mean that the file is an HTML page, there is no requirement
that it mean this, and many HTML pages have different file extensions.
In the HTTP protocol used by web browsers to talk to web servers, the "file extension" of the URL is not used to determine the type of information that the server will return. Indeed, there may be no file extension at all at the end of the URL.
Instead, the web server specifies the correct MIME type using a
Content-type: header when it responds to the web
browser's HTTP request.
Here are some examples of common mime types seen on the web:
| Type | Common File Extension | Purpose |
|---|---|---|
| text/html | .html | Web Page |
| image/png | .png | PNG-format image |
| image/jpeg | .jpeg | JPEG-format image |
| audio/mpeg | .mp3 | MPEG Audio File |
| application/octet-stream | .exe | Best for downloads that should just be saved to disk |
MIME stands for "Multimedia Internet Mail Extensions." MIME was originally invented to solve a similar problem for email attachments.
Legal Note: yes, you may use sample HTML, Javascript, PHP and other code presented above in your own projects. You may not reproduce large portions of the text of the article without our express permission.
Got a LiveJournal account? Keep up with the latest articles in this FAQ by adding our syndicated feed to your friends list!
Follow us on Twitter | Contact Us
Copyright 1994-2012 Boutell.Com, Inc. All Rights Reserved.
