Internet

Etymology

The etymology of the word Internet can be rooted with these two words

  • Inter - something outside (as opposed to intra - inside/exclusive)
  • Network - Network of networks and connection of devices

The Internet is the interconnection of networks all around the world which uses the TCP/IP protocol as the medium of connection

A Brief History of the Internet

Year Description
1969 ARPANET (by DARPA) with only four computers connected
1972 Email was born. The killer application that at the time was widely used by scientists to communicate
1989 While working at CERN Sir Tim Berners-Lee created the WWW, which included the >HTTP, HTML, URI, Web Server and the Web client.
Sir Tim Berners-Lee
  • A global information medium which users can read and write via computers connected to the Internet.
  • Invented by Sir Tim Berners-Lee.
  • In September 1994, Berners-Lee founded the World Wide Web Consortium (W3C) at the Massachusetts Institute of Technology with support from the Defense Advanced Research Projects Agency(DARPA) and the European Commission. It comprised various companies that were willing to create standards and recommendations to improve the quality of the Web.
HTTP

An application layer communications protocol used to access resources on the World Wide Web. HTTP is invented by Sir Tim Berners-Lee and jointly developed by W3C and IETF.

Version History

HTTP Version Description
HTTP 0.9 (1991) This was originally implemented by the World Wide Web initaitive software in the prototype released. This is a subset of the full HTTP protocol.
HTTP 1.0 (RFC 1945, May 1996) An application-level protocol with the lightness and speed necessary for distributed, collaborative, hypermedia information systems
HTTP 1.1 (RFC 2008, January 1997; RFC 2616, June 1999; RFC 7230-7235, June 2014) An application-level protocol for distributed, collaborative, hypermedia information systems.
HTTP 2 (RFC 7540 May 2015) Enables a more efficient use of network resources and a reduced perception of latency by introducing header field compression and allowing multiple concurrent exchanges on thesame connection.

HTTP Fundamentals

  • HTTP runs on top of the TCP/IP using TCP port 80 by default, or TCP port 443 for HTTPS(HTTP over SSL/TLS)
  • HTTP is based on a client-server architecture
  • Clients aka. User Agents(UA)serves as header of requests
  • Web Browser, Web Crawlers/Spiders are end user tools and applications
  • HTTP resources are identified using URIs (specifically, HTTP URLs)
    • Scheme (http: or https:)
    • (optional) authentication information
    • Host and (optional) port number
    • Path (resolved to the document root on the server) to the resource
    • (optional) scheme-specific parameters
    • (optional) URL-encoded query
    • optional) bookmark (or fragment identifier)

HTTP Request-Response Standard Protocol

  • The client sends an HTTP request message to the server
  • The server process the request and replies with an HTTP response message

Other Functionalities of HTTP

Standard Methods

GET
Transfer a current selected representation of the resource identified by the Request-URI
Conditional GET
Entity is transferred only under certain conditions specified in the conditional header fields.
Partial GET
Only parts covered by the range in Range header field will be transferred upon request.
HEAD
Used to retrieve metadata about the entity implied by the request without transferring the message-body.
GET
Transfer a current selected representation of the resource identified by the Request-URI.
HEAD
Used to retrieve metadata about the entity implied by the request without transferring the entity itself.
POST
Perform resource specific processing of the entities enclosed in the message
PUT
Requests that the enclosed entity be stored under the supplied Request-URI
DELETE
Requests that the origin server delete the resource indentified by the Request-URI
OPTIONS
describes the communication options for the target resource
TRACE
Request a loop-back of request message (request the server to echo back to client)
CONNECT
Establishes a tunnel to the server identified by the a given URL

Three Categories of Methods:

  • Safe methods - no changes on server resources
    • GET
    • HEAD
    • OPTIONS
    • TRACE
  • Not safe methods
    • POST
    • PUT
    • DELETE
  • Idempotent methods - doing it repeatedly does not change the response
    • GET
    • HEAD
    • OPTIONS
    • TRACE
    • PUT
    • DELETE

Message Header Fields

Cache-Control
Specifies cache directives or instructions for caching.
Connection
Specifies connection options.
Date
Represents message origin date and time.
Pragma
Specifies implementation-specific directives that can be included.
Trailer
Indicates that the trailer of a message includes a set of header fields.
Transfer-Encoding
This is where the type of transformation applied to message body upon transfer is indicated.
Upgrade
Specifies supported protocols for switching protocol.
Via
Indicates protocols used by gateways and proxies between user and server upon request.
Warning
Message additional information on its status.
Accept
Specifies response-acceptable media types.
Accept-Charset
Specifies response-acceptable character sets.
Accept-Encoding
Specifies response-acceptable content-codings with content-coding restrictions.
Accept-Language
Specifies response-acceptable languages with restrictions based on a set of natural languages.
Authorization
Allows authentication that may be used upon receiving 401 response.
Expect
Indicates client-required behavior of the server.
From
Contains user's internet e-mail address.
Host
Is where the host and port number of requested resource is specified.
If-Match
Condition for conditional GET that verifies whether and enity is current.
If-Modified
Since Condition for conditional GET that requested entity does not necessarily need to be transferred unless it was modified since a specified date.
If-None-Match
Condition for conditional GET that verifies if none of its enities is current to allow updates.
If-Range
Specifies a range of entities to be transferred for update purposes.
If-Unmodified
Condition for conditional GET that requested entity does not necessarily need to be transferred unless it was unmodified since a specified date.
Max-Forwards
Limits number of forwards between proxies and gateways to a specified number.
Proxy Authorization
Requires authentication to allow client to identify itself.
Range
Referer
Allows specification of URI where Request-URI was taken from to allow backlinks to some resources.
TE
Indicates accepted extension transfer-codings.
User-Agent
Contains requesting user agent's information.
Accept-Ranges
Allows indication of range for acceptance range of requests for a particular resource.
Age
Indicates estimate time since the origin generated the response.
ETag
Current value for a particular entity tag of the requested variant is provided.
Location
Used for redirection from the the Request-URI to another location for completion or identifying new resources.
Proxy-Authenticate
Indicates proxy authentication scheme and parameters of a Request-URI.
Retry-After
Can be used with 503 to indicate expected time for a service to be unavailable.
Server
Contains information on the software being used used by the origin server in handling a request.
Vary
Determines whether cache is permitted while the response is fresh with a set of request-header fields. Criteria is advised for uncacheabe responses.
www-Authenticate
Consists parameters and schemes of authentication to Request-URI that MUST be included in 401(Unauthorized) response message.
Allow
Request-URI identified list supported set of methods.
Content-Encoding
Indicates applied additional content codings and the apprpriate decoding mechanisms necessary in obtaining a particular media-type
Content-Language
Indicates natural languages available for an enclosed entity.
Content-Length
Indicates a decimal number of OCTETs which indicates the size of the entity-body sent to the recipient.
Content-Location
May be used to indicate the location of a resource which is accessible from a location different from the URI of the requested resource
Content-MD5
Entity-body MD5 digest for its message integrity check(MIC).
Content-Range
Specifies the part in the entity-body where the partial body is to be applied.

HTTP Status Codes

100 Continue
to have a server check the request's headers.
101 Switching Protocols
request for switching using protocol negotiation.
200 Ok
successful http request.
201 Created
request has been fulfilled.
202 Accepted
accepted but the process has not been completed.
203 Non-Authoritative Information
it tells that the request was successful but the enclosed payload not been modified.
204 No Content
successfully processed the request and is not returning any content.
205 Reset Content
requires that the requester reset the document view.
206 Partial Content
server is fulfilled the request for the target source.
300 Multiple Choices
request with several versions.
301 Moved Permanently
no longer there.
302 Found
page is temporarily moved.
303 See Other
is a thing to redirect application website to a new url.
304 Not Modified
conditional but has missing.
305 Use Proxy
don’t fetch it directly.
306 (unused)
307 Temporary Redirect
the main resource is redirect to a different url.
400 Bad Request
the server will not process the request due to an apparent client error.
401 Unauthorized
used when authentication is required and has failed or has not yet been provided.
402 Payment Required
reserved for future use.
403 Forbidden
the server is refusing action.
404 Not Found
the requested resource could not be found.
405 Method Not Allowed
a request method is not supported for the requested resource.
406 Not Accepted
requested resource is capable of generating only content.
407 Proxy Authentication Required
the client must first authenticate itself with the proxy.
408 Request Time-out
server timed out waiting for the request.
409 Conflict
request could not be processed because of conflict in the request.
410 Gone
resource requested is no longer available and will not be available again.
411 Length Required
request did not specify the length of its content.
412 Precondition Failed
server does not meet one of the preconditions.
413 Request Entity Too Large
request is larger than the server is willing or able to process.
414 Request-URI Too Large
URI provided was too long for the server to process.
415 Unsupported Media Type
request entity has a media type which the server or resource does not support.
416 Requested Range Not Satisfiable
the client has asked for a portion of the file (byte serving), but the server cannot supply that portion.
417 Expectation Failed
the server has not satified the expectation of request header field.
426 Upgrade Required
server cannot meet the requirements of the expect request-header field.
500 Internal Server Error
a generic error message.
501 Not Implemented
implies future availability.
502 Bad Gateway
proxy received an invalid response from the upstream server.
503 Service Unavailable
a temporary state.
504 Gateway Time-out
gateway and did not receive a timely response from the upstream server.
505 HTTP Version Not Supported
the server has not accept the version of http.
  • Cache Control - Local storage.
  • Client-Server Architecture - A network architecture in which each computer or process on the network is either a client or a server.
  • DARPA (Defense Advanced Research Projects Agency) - An agency of the U.S. Department of Defense responsible for the development of emerging technologies for use by the military.
  • HTML (Hypertext Markup Language) - An application layer communications protocol used to access resources on the World Wide Web.
  • HTTP (Hypertext Transfer Protocol) - An Application layer used primarily to retrieve hypertext documents and resources on the World Wide Web.
  • HTTPS (HTTP over SSL/TLS) - A connection encrypted by TLS/SSL.
  • MIME (Multipurpose Internet Mail Extensions) - An Internet standard that extends the format of email to support: Text in character sets other than ASCII.
  • Protocol - Set of rules need to be followed.
  • Sir Tim Berners-Lee - He is the father of World Wide Web.
  • TCP/IP (Transmission Control Protocol/Internet Protocol) - The language a computer uses to access the Internet.
  • URI (Uniform Resource Identifier) - A string of characters used to identify a resource.
  • URL (Uniform Resource Locator) - It is used to specify addresses on the WWW.
  • Web Browser - A software application for retrieving, presenting and traversing information resources on the WWW.
  • Web Crawlers/Spiders - A program or automated script which browses the World Wide Web in a methodical, automated manner.
  • Web Client - An application that communicates with a web server, using HTTP.
  • Web Server - The basic network protocol used to distribute information on the WWW.
  • WWW (World Wide Web) - A medium which users can read and write via computers connected to the Internet.
  • W3C (World Wide Web Consortium ) - It is the main international standards organization for the World Wide Web.
  • The Original HTTP as defined in 1991. (n.d.). Retrieved March 16, 2017, from https://www.w3.org/Protocols/HTTP/AsImplemented.html
  • RFC 1945 - Hypertext Transfer Protocol -- HTTP/1.0. (n.d.). Retrieved March 16, 2017, from https://tools.ietf.org/html/rfc1945
  • Hypertext Transfer Protocol -- HTTP/1.1. (n.d.). Retrieved March 16, 2017, from https://www.w3.org/Protocols/rfc2616/rfc2616.html
  • RFC 7540 - Hypertext Transfer Protocol Version 2 (HTTP/2). (n.d.). Retrieved March 16, 2017, from https://tools.ietf.org/html/rfc7540
  • HTTP/1.1: Header Field Definitions. (n.d.). Retrieved March 16, 2017, from https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.10
  • List of HTTP status codes. (2017, March 19). Retrieved March 20, 2017, from https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
  • HTTP Status Codes. (n.d.). Retrieved March 20, 2017, from https://httpstatuses.com/
  • Tim Berners-Lee. (2017, March 16). Retrieved March 21, 2017, from https://simple.wikipedia.org/wiki/Tim_Berners-Lee
  • Hypertext Transfer Protocol. (2017, March 18). Retrieved March 21, 2017, from https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol
  • Subtle Patterns. (n.d.). Retrieved March 21, 2017, from https://www.toptal.com/designers/subtlepatterns/
  • User vs Author vs User Agent style sheets. (n.d.). Retrieved April 20, 2017, from http://praveen-vemulapalli.blogspot.com/2013/01/user-vs-author-vs-user-agent-style.html
  • Lazaris, L. (2017, March 29). !important CSS Declarations: How and When to Use Them. Retrieved April 20, 2017, from https://www.smashingmagazine.com/2010/11/the-important-css-declaration-how-and-when-to-use-it/
  • At-rule. (n.d.). Retrieved April 20, 2017, from https://developer.mozilla.org/en/docs/Web/CSS/At-rule
  • Type selectors. (n.d.). Retrieved April 20, 2017, from https://developer.mozilla.org/en/docs/Web/CSS/Type_selectors
  • Universal selectors. (n.d.). Retrieved April 20, 2017, from https://developer.mozilla.org/en-US/docs/Web/CSS/Universal_selectors
  • Attribute selectors. (n.d.). Retrieved April 20, 2017, from https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors
  • Class selectors. (n.d.). Retrieved April 20, 2017, from https://developer.mozilla.org/en-US/docs/Web/CSS/Class_selectors
  • Meet the Pseudo Class Selectors. (2016, June 16). Retrieved April 20, 2017, from https://css-tricks.com/pseudo-class-selectors/
  • JSP Tutorial - javatpoint. (n.d.). Retrieved May 20, 2017, from https://www.javatpoint.com/jsp-tutorial
  • The Java EE 5 Tutorial. (2007, September 01). Retrieved May 20, 2017, from http://docs.oracle.com/javaee/5/tutorial/doc/bnagy.html
  • (n.d.). Retrieved May 20, 2017, from http://www.oracle.com/technetwork/java/jstl-137486.html
  • T. (n.d.). JSP Standard Tag Library (JSTL) Tutorial. Retrieved May 20, 2017, from https://www.tutorialspoint.com/jsp/jsp_standard_tag_library.htm
  • T. (n.d.). JSP Expression Language. Retrieved May 20, 2017, from https://www.tutorialspoint.com/jsp/jsp_expression_language.htm
  • (2013, January 01). Retrieved May 20, 2017, from http://docs.oracle.com/javaee/6/tutorial/doc/gjddd.html