304 Not Modified Use in conjunction with If-Modified-Since header Error Responses 400 Bad Request Syntax error in request 401 Unauthorized Use in conjunction with WWW-Authenticate header 404 Not Found Resource not found Server Error Responses 500 Internal Server Error Generic server error. Server unable to indicate precise error. 501 Not Implemented Server knows it does not support the method. E.g. later version 502 Service Unavailable Server temporarily unable to respond. May be temp busy.
HTTP Response Headers › Selection of HTTP Response Headers – Content-Encoding. Specify how the content is encoded and how the client should decode it. › Predefine types include x-gzip (GNU zip) and “x - compress” (Unix zip) – Content-Length. Specify the length of attached document. – Content-Type. Specify the MIME type and sub-type entity. Based on the type, the browser perform one of the following actions: › Content directly rendered by browser › Content viewed using external viewer (E.g., MS Word) or plug-in › No appropriate viewer available on client to view content 55
HTTP Response Headers – Expires. A way for sender to state the expiry date of a resource. A Client or proxy should not cache a response beyond the date/time. – Last Modified. Gives the time and date the document was last changed. – Location. Gives new location of requested document. Use for re-direction. – Server. Descriptive information about the HTTP server. Contains vendor and version information. – Set-Cookie. Contains name/value pair to be stored by browsers on client-side. 56
Summary › Web content – Web page Elements – Hypertext Transfer Protocol (HTTP) – Web Browsers – Website › Coding in HTML › XHTML › More on HTTP 57
Further Reading › HTML5 Tutorial – › HTML vs XHTML – › View HTTP Response Header – 58
You've reached the end of your free preview.
Want to read all 59 pages?
- Spring '19
- World Wide Web, Hypertext Transfer Protocol