Question 1
The World Wide Web is system that consists of internet servers that supports particular formatted documents, which is formatted by HTML(HyperText Markup Language). You are able to jump from one document to another just by clicking on links. HTTP(HyperText Transfer Protocol) is used to transfer web pages to computers. Hyperlinks connects all the webpages together by the address, also know as URL(Uniform Resource Locator). These web pages can be accessed via browsers such as Firefox, Google Chrome, Internet Explorer and so on. The web pages also consists of content such as images, video, audio and so on.
The internet however, is a collection of networks which connects multiple computers together globally. A computer can easily communicate with another computer as long as it is connected via the Internet. Information travels through the Internet via protocols. Whenever you use an app on your phone, to send an email, or instant message and so on, you are using the Internet, it may not be necessarily on the web. The internet links computers to other computers around the world in order to transport content. The Web is a software that allows you to make use of the content. Basically, the Internet is the hardware part, that connects via cables or wireless connections. The web is the software part which is the collection of webpages connected via hyperlinks. In short, the World Wide Web is part of the services provided by the Internet. Another thing to add is that the Internet is governed by Internet Protocols but the Web is governed by HTTP.
Question 2
1. 2xx - Success
This class of status code indicates that the client's request was successfully received, understood, and accepted.
Examples:
a) 204 - No content
The server has fulfilled the request but does not need to return an entity-body, and might want to return updated metainformation. The response may include new or updated metainformation in the form of entity-headers, which if present should be associated with the requested variant.
b) 202 - Accepted
The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place.
c)208 Already Reported (WebDAV)
The 208 (Already Reported) status code can be used inside a DAV: propstat response element to avoid enumerating the internal members of multiple bindings to the same collection repeatedly. For each binding to a collection inside the request's scope, only one will be reported with a 200 status, while subsequent DAV:response elements for all other bindings will use the 208 status, and no DAV:response elements for their descendants are included.
2. 3xx - Redirection
This class of status code indicates that further action needs to be taken by the user agent in order to fulfill the request. The action required may be carried out by the user agent without interaction with the user if and only if the method used in the second request is get or head. A client should detect infinite redirection loops, since such loops generate network traffic for each redirection.
a) 304 - Not modified
Indicates the resource has not been modified since last requested. Typically, the HTTP client provides a header like the If-Modified-Since header to provide a time against which to compare. Using this saves bandwidth and reprocessing on both the server and client, as only the header data must be sent and received in comparison to the entirety of the page being re-processed by the server, then sent again using more bandwidth of the server and client.
b) 303 - See other
The response to the request can be found under another URI using a GET method. When received in response to a POST (or PUT/DELETE), it should be assumed that the server has received the data and the redirect should be issued with a separate GET message.
c) 305 - Use proxy
The requested resource MUST be accessed through the proxy given by the Location field. The Location field gives the URI of the proxy. The recipient is expected to repeat this single request via the proxy. 305 responses MUST only be generated by origin servers.
3. 5xxx - Server Error
Response status codes beginning with the digit "5" indicate cases in which the server is aware that it has erred or is incapable of performing the request. Except when responding to a head request, the server should include an entity containing an explanation of the error situation, and whether it is a temporary or permanent condition. User agents should display any included entity to the user. These response codes are applicable to any request method.
a) 501 - Not implemented
The server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.
b) 504 - Gateway timeout
The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server specified by the URI (e.g. HTTP, FTP, LDAP) or some other auxiliary server (e.g. DNS) it needed to access in attempting to complete the request.
c) 505 - HTTP version not supported
The server does not support, or refuses to support, the HTTP protocol version that was used in the request message. The server is indicating that it is unable or unwilling to complete the request using the same major version as the client, as described in section 3.1, other than with this error message. The response should contain an entity describing why that version is not supported and what other protocols are supported by that server.