Suporte para cache no protocolo HTTP2011-2012Metodologias de Programação IV
GET /tc/home.html HTTP/1.1Host: www.tribunalconstitucional.pt...HTTP/1.1 200 OKContent-Type: text/html………
GET /tc/home.html HTTP/1.1Host: www.tribunalconstitucional.pt...HTTP/1.1 200 OKContent-Type: text/html………+ 40.318 bytes
GET /tc/home.html HTTP/1.1Host: www.tribunalconstitucional.pt...HTTP/1.1 200 OKContent-Type: text/htmlDate: Sun, 16 Oct 2011 16:20:34 GMTLast-Modified: Sun, 16 Oct 2011 07:49:25 GMT…+ 40.318 bytes
GET /tc/home.html HTTP/1.1Host: www.tribunalconstitucional.pt...HTTP/1.1 200 OKContent-Type: text/htmlDate: Sun, 16 Oct 2011 16:20:34 GMTLast-Modified: Sun, 16 Oct 2011 07:49:25 GMT…+ 40.318 bytes
Last-Modified: Wed, 29 Sep 2010 16:33:13 GMTLast-Modified: Thu, 02 Jul 2009 02:19:00 GMTLast-Modified: Sat, 06 Feb 2010 19:47:46 GMTLast-Modified: Wed, 17 Sep 2003 14:46:36 GMT//v1.7// Flash Player Version Detection// Detect Client Browser typeLast-Modified: Thu, 29 Jan 2009 02:09:59 GMTLast-Modified: Sun, 16 Oct 2011 07:49:26 GMT
ClienteServidor
ClienteServidorProxies...
HEAD /tc/home.html HTTP/1.1Host: www.tribunalconstitucional.pt...HTTP/1.1 200 OKContent-Type: text/htmlDate: Sun, 16 Oct 2011 16:20:34 GMTLast-Modified: Sun, 16 Oct 2011 07:49:25 GMT…+ 0 bytes
HEAD /tc/home.html HTTP/1.1Host: www.tribunalconstitucional.pt...HTTP/1.1 200 OKConnection: Keep-AliveClient-response-num: 1Keep-Alive: timeout=15, max=100Set-Cookie: AF_SID=b672a03f4a0338f035131f6b8034ff33; path=/Date: Sun, 16 Oct 2011 16:20:34 GMTLast-Modified: Sun, 16 Oct 2011 07:49:25 GMTClient-peer: 65.98.99.99.166:80Client-date: Sun, 16 Oct 2011 16:20:34 GMTContent-Type: text/htmlServer: Apache/1.3.41 (Unix) mod_perl/1.31 mod_ssl/2.8.31 OpenSSL/0.9.8e420 bytes
HEAD /tc/home.html HTTP/1.1Host: www.tribunalconstitucional.pt...HTTP/1.1 200 OKConnection: Keep-AliveClient-response-num: 1Keep-Alive: timeout=15, max=100Set-Cookie: AF_SID=b672a03f4a0338f035131f6b8034ff33; path=/Date: Sun, 16 Oct 2011 16:20:34 GMTLast-Modified: Sun, 16 Oct 2011 07:49:25 GMTClient-peer: 65.98.99.99.166:80Client-date: Sun, 16 Oct 2011 16:20:34 GMTContent-Type: text/htmlServer: Apache/1.3.41 (Unix) mod_perl/1.31 mod_ssl/2.8.31 OpenSSL/0.9.8e420 bytesMas se setiveralteradoemrelação à cópiaem cache…GET /tc/home.html...
ClienteServidorHEAD ...HTTP/1.1 200 OK
ClienteServidorHEAD ...HTTP/1.1 200 OKGET ...HTTP/1.1 200 OK
GET /tc/home.html HTTP/1.1Host: www.tribunalconstitucional.ptIf-Modified-Since: Fri, 14 Oct 2011 19:08:24 GMT...HTTP/1.1 200 OKDate: Sun, 16 Oct 2011 16:20:34 GMTLast-Modified: Sun, 16 Oct 2011 07:49:25 GMTServer: Apache/1.3.41 (Unix) mod_perl/1.31 mod_ssl/2.8.31 OpenSSL/0.9.8eSet-Cookie: AF_SID=7896d3ac9d40552973a20a4e6cd7ceac; path=/Keep-Alive: timeout=15, max=100Connection: Keep-AliveTransfer-Encoding: chunkedContent-Type: text/html+ 40.318 bytes
GET /tc/home.html HTTP/1.1Host: www.tribunalconstitucional.ptIf-Modified-Since: Fri, 14 Oct 2011 19:08:24 GMT...HTTP/1.1 200 OKDate: Sun, 16 Oct 2011 16:20:34 GMTLast-Modified: Sun, 16 Oct 2011 07:49:25 GMTServer: Apache/1.3.41 (Unix) mod_perl/1.31 mod_ssl/2.8.31 OpenSSL/0.9.8eSet-Cookie: AF_SID=7896d3ac9d40552973a20a4e6cd7ceac; path=/Keep-Alive: timeout=15, max=100Connection: Keep-AliveTransfer-Encoding: chunkedContent-Type: text/html+ 40.318 bytes
GET /tc/home.html HTTP/1.1Host: www.tribunalconstitucional.ptIf-Modified-Since: Sun, 16 Oct 2011 07:49:25 GMT...299 bytesHTTP/1.1 304 NotmodifiedConnection: Keep-AliveKeep-Alive: timeout=15, max=99Date: Sun, 16 Oct 2011 18:26:07 GMTClient-peer: 65.98.99.166:80Etag: "e05af-19db-4a4beb1b“Client-date: Sun, 16 Oct 2011 18:26:06 GMTServer: Apache/1.3.41 (Unix) mod_perl/1.31 mod_ssl/2.8.31 OpenSSL/0.9.8e
ClienteServidorGET ...HTTP/1.1 200 OKHTTP/1.1 304 Notmodified
HEADIf-Modified-Since
“HTTP/1.1 implements a more efficientapproach to thisproblemusingtwonewheaders: If-Modified-Sinceand(...)” (p. 58)HEADIf-Modified-Since
“HTTP/1.1 implements a more efficientapproach to thisproblemusingtwonewheaders: If-Modified-Sinceand(...)” (p. 58)HEADIf-Modified-Since
HEADIf-Modified-Sincehttp://bit.ly/oNhktc
HEADIf-Modified-SinceIdeal para cacheAlternativa p/ cacheRecolha delistas de recursos
HEADIf-Modified-SinceIdeal para cacheAlternativa p/ cacheRecolha delistas de recursos
Leituras associadasWeb ApplicationArchitecture, Second EditionCap. 3: “Birth of the Web: HTTP”, pp. 49-51 e 58-59.Krishnamurthy, B.; Mogul, J.; Kristol, D. (1999).Key Differences between HTTP/1.0 and HTTP/1.1. In “WWW8 Conference Refereed Papers”, Eighth International World Wide Web Conference, Toronto Convention Centre, Toronto, Canadá,11 a 14 de Maio, 1999.http://bit.ly/oNhktc

Metodologias de Programação IV - Aula 4, Secção 1 - Suporte para cache no protocolo HTTP

  • 1.
    Suporte para cacheno protocolo HTTP2011-2012Metodologias de Programação IV
  • 2.
    GET /tc/home.html HTTP/1.1Host:www.tribunalconstitucional.pt...HTTP/1.1 200 OKContent-Type: text/html………
  • 3.
    GET /tc/home.html HTTP/1.1Host:www.tribunalconstitucional.pt...HTTP/1.1 200 OKContent-Type: text/html………+ 40.318 bytes
  • 4.
    GET /tc/home.html HTTP/1.1Host:www.tribunalconstitucional.pt...HTTP/1.1 200 OKContent-Type: text/htmlDate: Sun, 16 Oct 2011 16:20:34 GMTLast-Modified: Sun, 16 Oct 2011 07:49:25 GMT…+ 40.318 bytes
  • 5.
    GET /tc/home.html HTTP/1.1Host:www.tribunalconstitucional.pt...HTTP/1.1 200 OKContent-Type: text/htmlDate: Sun, 16 Oct 2011 16:20:34 GMTLast-Modified: Sun, 16 Oct 2011 07:49:25 GMT…+ 40.318 bytes
  • 6.
    Last-Modified: Wed, 29Sep 2010 16:33:13 GMTLast-Modified: Thu, 02 Jul 2009 02:19:00 GMTLast-Modified: Sat, 06 Feb 2010 19:47:46 GMTLast-Modified: Wed, 17 Sep 2003 14:46:36 GMT//v1.7// Flash Player Version Detection// Detect Client Browser typeLast-Modified: Thu, 29 Jan 2009 02:09:59 GMTLast-Modified: Sun, 16 Oct 2011 07:49:26 GMT
  • 7.
  • 8.
  • 9.
    HEAD /tc/home.html HTTP/1.1Host:www.tribunalconstitucional.pt...HTTP/1.1 200 OKContent-Type: text/htmlDate: Sun, 16 Oct 2011 16:20:34 GMTLast-Modified: Sun, 16 Oct 2011 07:49:25 GMT…+ 0 bytes
  • 10.
    HEAD /tc/home.html HTTP/1.1Host:www.tribunalconstitucional.pt...HTTP/1.1 200 OKConnection: Keep-AliveClient-response-num: 1Keep-Alive: timeout=15, max=100Set-Cookie: AF_SID=b672a03f4a0338f035131f6b8034ff33; path=/Date: Sun, 16 Oct 2011 16:20:34 GMTLast-Modified: Sun, 16 Oct 2011 07:49:25 GMTClient-peer: 65.98.99.99.166:80Client-date: Sun, 16 Oct 2011 16:20:34 GMTContent-Type: text/htmlServer: Apache/1.3.41 (Unix) mod_perl/1.31 mod_ssl/2.8.31 OpenSSL/0.9.8e420 bytes
  • 11.
    HEAD /tc/home.html HTTP/1.1Host:www.tribunalconstitucional.pt...HTTP/1.1 200 OKConnection: Keep-AliveClient-response-num: 1Keep-Alive: timeout=15, max=100Set-Cookie: AF_SID=b672a03f4a0338f035131f6b8034ff33; path=/Date: Sun, 16 Oct 2011 16:20:34 GMTLast-Modified: Sun, 16 Oct 2011 07:49:25 GMTClient-peer: 65.98.99.99.166:80Client-date: Sun, 16 Oct 2011 16:20:34 GMTContent-Type: text/htmlServer: Apache/1.3.41 (Unix) mod_perl/1.31 mod_ssl/2.8.31 OpenSSL/0.9.8e420 bytesMas se setiveralteradoemrelação à cópiaem cache…GET /tc/home.html...
  • 12.
  • 13.
    ClienteServidorHEAD ...HTTP/1.1 200OKGET ...HTTP/1.1 200 OK
  • 14.
    GET /tc/home.html HTTP/1.1Host:www.tribunalconstitucional.ptIf-Modified-Since: Fri, 14 Oct 2011 19:08:24 GMT...HTTP/1.1 200 OKDate: Sun, 16 Oct 2011 16:20:34 GMTLast-Modified: Sun, 16 Oct 2011 07:49:25 GMTServer: Apache/1.3.41 (Unix) mod_perl/1.31 mod_ssl/2.8.31 OpenSSL/0.9.8eSet-Cookie: AF_SID=7896d3ac9d40552973a20a4e6cd7ceac; path=/Keep-Alive: timeout=15, max=100Connection: Keep-AliveTransfer-Encoding: chunkedContent-Type: text/html+ 40.318 bytes
  • 15.
    GET /tc/home.html HTTP/1.1Host:www.tribunalconstitucional.ptIf-Modified-Since: Fri, 14 Oct 2011 19:08:24 GMT...HTTP/1.1 200 OKDate: Sun, 16 Oct 2011 16:20:34 GMTLast-Modified: Sun, 16 Oct 2011 07:49:25 GMTServer: Apache/1.3.41 (Unix) mod_perl/1.31 mod_ssl/2.8.31 OpenSSL/0.9.8eSet-Cookie: AF_SID=7896d3ac9d40552973a20a4e6cd7ceac; path=/Keep-Alive: timeout=15, max=100Connection: Keep-AliveTransfer-Encoding: chunkedContent-Type: text/html+ 40.318 bytes
  • 16.
    GET /tc/home.html HTTP/1.1Host:www.tribunalconstitucional.ptIf-Modified-Since: Sun, 16 Oct 2011 07:49:25 GMT...299 bytesHTTP/1.1 304 NotmodifiedConnection: Keep-AliveKeep-Alive: timeout=15, max=99Date: Sun, 16 Oct 2011 18:26:07 GMTClient-peer: 65.98.99.166:80Etag: "e05af-19db-4a4beb1b“Client-date: Sun, 16 Oct 2011 18:26:06 GMTServer: Apache/1.3.41 (Unix) mod_perl/1.31 mod_ssl/2.8.31 OpenSSL/0.9.8e
  • 17.
    ClienteServidorGET ...HTTP/1.1 200OKHTTP/1.1 304 Notmodified
  • 18.
  • 19.
    “HTTP/1.1 implements amore efficientapproach to thisproblemusingtwonewheaders: If-Modified-Sinceand(...)” (p. 58)HEADIf-Modified-Since
  • 20.
    “HTTP/1.1 implements amore efficientapproach to thisproblemusingtwonewheaders: If-Modified-Sinceand(...)” (p. 58)HEADIf-Modified-Since
  • 22.
  • 23.
    HEADIf-Modified-SinceIdeal para cacheAlternativap/ cacheRecolha delistas de recursos
  • 24.
    HEADIf-Modified-SinceIdeal para cacheAlternativap/ cacheRecolha delistas de recursos
  • 25.
    Leituras associadasWeb ApplicationArchitecture,Second EditionCap. 3: “Birth of the Web: HTTP”, pp. 49-51 e 58-59.Krishnamurthy, B.; Mogul, J.; Kristol, D. (1999).Key Differences between HTTP/1.0 and HTTP/1.1. In “WWW8 Conference Refereed Papers”, Eighth International World Wide Web Conference, Toronto Convention Centre, Toronto, Canadá,11 a 14 de Maio, 1999.http://bit.ly/oNhktc