Main Content

Http protocol - what does a web server send

Archive - Originally posted on "The Horse's Mouth" - 2010-01-24 19:22:25 - Graham Ellis

Question - what information do you send using http protocol from a web server?

1. HTML (e.g. .html)
2. Images (e.g. .jpg, .gif, .png)
3. Icons (e.g. .ico)
4. Style Sheets (e.g. .css)
5. Java Scripts (e.g. .js)
6. Applets (e.g. .class)
7. Video (e.g. .rm, .mpg, .mp4)
8. Sound (e.g. .mp3)
9. Flash (e.g. .swf)
10. Text files (e.g. robots.txt)
11. XML (e.g. sitemap.xml)
12. HTML++ embedded scripts (e.g. .php, .jsp)

Answer - all of the above EXCEPT No. 12, which is stored on the web server computer's discs, but is used to generate content of the other types listed - typically HTML - before it is sent to the browser.

Further Explanation - Although the name makes is sound as if HTTP is used to send HTML, that's only a part of the story. Originally, HTML was the main content sent via HTTP , but these days when you browse a web page, the intial HTML will trigger your browser to make further HTTP requests for images, and perhaps many of the other elements listed above from (2) to (9).

Only rarely will you call up files like robots.txt (which tells search engines and other automata where they should not go) and sitemap.xml (which you may use to set up to inform the search engines about the relative priority of pages that they may index), but automata will call them up, fairly often, via HTTP if they exist.