• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/8

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

8 Cards in this Set

  • Front
  • Back

The uniform resource identifier URI:


* The URI allows all resources on the internet to be accessible using a uniform addressing scheme (this does not mean that handling the data was uniform)


* A URI can be either or both


- A URN (universal resource name)


- A URL (universal resource locator)




:[?][#]



URN :


* is a name that is globally unique


* is persistent, even when when not available on the net


* location independent


* typeable on a keyboard




"urn:" ":"


NID = namespace identifier


NSS = namespace-specific text




Namespace:


* A namespace is a domain in which a name can be unique


Eg: there is many "Swanston street" in Melbourne, to make it unique we can add info like CBD:Swanston-St or Australia:3000:Swanston-St

URL:


* A URL describes a location for the resource


* and a method for accessing that location


* In a URL, the scheme determines the method used to access the resource, and its syntax. The method and syntax access depends on the scheme.




HTTP's URL:


* web servers expect to be consistent with the HTTP protocol


* HTTP URLs are used to address a HTTP server


* The basic format is:




http://hostname:port/path/to/the/resource




*if the port is emitted then the standard 80 port is used




Parts of a URL

Parts of a URL



Difference between a URN and a URL:




* URL includes protocol along with the location to identify the resource


* URN are the unambiguous way to identity a resource. ISBN best examples of URN

Alternatives and variations:


* CURIE (Compact URI)


* IRI internationalised resource identifier - not restricted and can be in any language for alphabet for which a unicode character exists

Retrieval with HTTP:


* 5 main steps usually implemented as a browser client



1. Map the server domain name to the


IP address


2. Establish a TCP/IP connection to the


web server


3. Transmit a request to the server - which


includes a request method, and any


additional info


4. Receive a response from the server, such


as HTML text, an image, or other info


5. Server terminates the TCP/IP connection


(if timeout the client terminates)

* HTTP has two phases request and respond


* HTTP is a stateless protocol - no memory involved in the transaction. Sessions and cookies can be used for state




On the request line there are 10 possible request methods : get, head, post, put, options, connect and others.

GET method:




* The GET method is designed to retrieve a resource from a web server. It also includes additional information to help the web server create a response.


* The information is usually put into a form by the user, and then appended to the request line


* "?" is appended to the request line, and each variable value pair is coded using a limited - mostly alphanumeric set




http://test.com/pages.php?page=22&user=student




A search is a good example of a GET request.


The resource will search a database and the query component from the form data to the URL will make up the search conditions.




* GET has no adverse side effects. A search for example does not create or change a database

POST Method:




* The POST method was intended to create a resource on the web server.


* To do this: the POST method calls for a script to be executed on the web server and for the output of that script to be returned.


* The user supplied data to this script through a form




* The POST method transmits the request in 2 parts:


- the request itself


- body containing user data from the fields


This adds a small transmission overhead.




*This methods has persistent side effects, for eg: submitting an online form will create a new record in the database.



Safe methods:


* normally, certain requests from a web server will result in the server changing its state in some way, whereas other methods will not


* a safe method is one which is idempotent


- these include : GET, HEAD, OPTIONS, TRACE


- These don't change the state of the server itself




In summary:


Use GET :


* If the request is just finding a resource and the form data is to help that search


* the data collected on the form is small, as a guide data should be less than 1024 characters




Use POST:


* the result of the request will have persistent side effects, like adding a new record


* the data collected on the form is likely to result in a large URL if implemented using the GET method.


* you want to send any data other than ASCII


* The overhead of the separate message is unimportant.

NEXT

HTTP headers:


Four types of headers used in HTTP messages:


1. general headers


2. request headers


3. response headers


4. entity headers




General and request headers are sent by the client.


General and response headers are sent by the server.


Entity headers are sent by the server but belong to the web resource, and provide more information about it.



General headers:


* General headers are use by both the client and the server


* They indicate general information about the transaction; such as date, time a response was sent.




Request headers:


* only used by the client


* these headers are used to provide more information about the request, or the client sending it.




Response headers:


* only used by the server


* these headers are used to provide more information, about the response, or the server sending it.




HTTP Entities:


* Entities represent the web resource requested by the web clients and server by the web servers


* Entities are more than just the web resource itself


* they are the combination of the resource and entity headers which describe it

Simultaneous requests:


* simultaneous requests reduce the time required to retrieve complete documents.


* due to finite bandwidth using simultaneous connections increases overall network congestion.



not done