http colon slash slash: the end of the road?
Post on 08-May-2015
2.900 Views
Preview:
DESCRIPTION
TRANSCRIPT
Tim Berners-Lee
Roy Fielding
GET
separate connections
POST
HEAD
1996TRACE
OPTIONS
PUT
DELETE
PATCH
DIFF
Domain Application Protocol
CACHEhttp://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html
CACHE CHANNELS
304 Not modified
EXPIRES
SCALABILITY
MAX-AGE
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:cc="http://purl.org/syndication/cache-channel"> <title>Invalidations for www.example.org</title> <id>http://admin.example.org/events/</id> <link rel="self" href="http://admin.example.org/events/current"/> <link rel="prev-archive" href="http://admin.example.org/events/archive/1234"/> <updated>2007-04-13T11:23:42Z</updated> <author> <name>Administrator</name> <email>web-admin@example.org</email> </author> <cc:precision>60</cc:precision> <cc:lifetime>2592000</cc:lifetime> <entry> <title>stale</title> <id>http://admin.example.org/events/1124</id> <updated>2007-04-13T11:23:42Z</updated> <link href="urn:uuid:50D3565C-97A8-40E1-A5C8-CFA070166FEF"/> <cc:stale/> </entry> <entry> <title>stale</title> <id>http://admin.example.org/events/1125</id> <updated>2007-04-13T10:31:01Z</updated> <link href="http://www.example.org/img/123.gif" type="image/gif"/> <link href="http://www.example.org/img/123.png" type="image/png"/> <cc:stale/> </entry> </feed>
GET /users/1 HTTP/1.1Host: example.com
HTTP/1.1 200 OkEtag: 123abc
GET /users/1 HTTP/1.1Host: example.comIf-None-Match: 123abc
HTTP/1.1 304 Not Modified
POST /users/1 HTTP/1.1Host: example.comEtag: 123abcdefgh...
HTTP/1.1 412Precondition Failed
GET /users/1 HTTP/1.1Host: example.com
HTTP/1.1 200 OkCache-Control: max-age=60
GET /users/1 HTTP/1.1Host: example.com
GET / HTTP/1.1Host: www.example.comCache-Control: max-age=60, public
Cacheable by both local and shared caches
GET / HTTP/1.1Host: www.example.comCache-Control: stale-if-error=600, stale-while-revalidate=600
fault-tolerant
GET / HTTP/1.1Host: www.example.comCache-Control: stale-if-error=600, stale-while-revalidate=600
available during downtime
GET / HTTP/1.1Host: www.example.comCache-Control: stale-if-error=600, stale-while-revalidate=600
available during revalidation
GET / HTTP/1.1Host: www.example.comIf-None-Match: 1234
the browsers asks you if it has been modified
Conditional requests
GET / HTTP/1.1Host: www.example.comLast-Modified: Tue, 15 Jan 2011 12:00:00 GMT
tell the client about the latest change
GET / HTTP/1.1Host: www.example.comIf-Modified-Since: Tue, 15 Jan 2011 12:00:00 GMT
the client asks you if it has been modified since the last time
Conditional requests
The web is not meant for invalidating data.
Server should not be able to keep clients' state, otherwise they wont scale well.
That's why long-polling and endless connections haven't had big success dealing with caching.
HTTP's cache fails when dealing with really dynamic pages, because consumers will always have to hit the
origin server, although a part of the page would be cacheable ( header and footer, for example )
ESI was built for thathttp://www.w3.org/TR/esi-lang
HInclude was built for thathttp://mnot.github.com/hinclude/
because the hard work is delegated to the browser/proxy
http://www.flickr.com/photos/snakphotography/5004775320/sizes/o/in/photostream/
http://dev.chromium.org/spdy/spdy-whitepaper
SPDYhttp://lists.w3.org/Archives/Public/ietf-http-wg/2012OctDec/0004.html
http://www.slideshare.net/mnot/what-http20-will-do-for-you
top related