Your SlideShare is downloading. ×
Metodologias de Programação IV - Aula 4, Secção 1 - Suporte para cache no protocolo HTTP
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

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

5,380
views

Published on

Suporte para cache no protocolo HTTP

Suporte para cache no protocolo HTTP

Published in: Education, Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
5,380
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Suporte para cache no protocolo HTTP
    2011-2012
    Metodologias de Programação IV
  • 2. GET /tc/home.html HTTP/1.1
    Host: www.tribunalconstitucional.pt
    ...
    HTTP/1.1 200 OK
    Content-Type: text/html



  • 3. GET /tc/home.html HTTP/1.1
    Host: www.tribunalconstitucional.pt
    ...
    HTTP/1.1 200 OK
    Content-Type: text/html



    + 40.318 bytes
  • 4. GET /tc/home.html HTTP/1.1
    Host: www.tribunalconstitucional.pt
    ...
    HTTP/1.1 200 OK
    Content-Type: text/html
    Date: Sun, 16 Oct 2011 16:20:34 GMT
    Last-Modified: Sun, 16 Oct 2011 07:49:25 GMT

    + 40.318 bytes
  • 5. GET /tc/home.html HTTP/1.1
    Host: www.tribunalconstitucional.pt
    ...
    HTTP/1.1 200 OK
    Content-Type: text/html
    Date: Sun, 16 Oct 2011 16:20:34 GMT
    Last-Modified: Sun, 16 Oct 2011 07:49:25 GMT

    + 40.318 bytes
  • 6. Last-Modified: Wed, 29 Sep 2010 16:33:13 GMT
    Last-Modified: Thu, 02 Jul 2009 02:19:00 GMT
    Last-Modified: Sat, 06 Feb 2010 19:47:46 GMT
    Last-Modified: Wed, 17 Sep 2003 14:46:36 GMT
    //v1.7
    // Flash Player Version Detection
    // Detect Client Browser type
    Last-Modified: Thu, 29 Jan 2009 02:09:59 GMT
    Last-Modified: Sun, 16 Oct 2011 07:49:26 GMT
  • 7. Cliente
    Servidor
  • 8. Cliente
    Servidor
    Proxies
    ...
  • 9. HEAD /tc/home.html HTTP/1.1
    Host: www.tribunalconstitucional.pt
    ...
    HTTP/1.1 200 OK
    Content-Type: text/html
    Date: Sun, 16 Oct 2011 16:20:34 GMT
    Last-Modified: Sun, 16 Oct 2011 07:49:25 GMT

    + 0 bytes
  • 10. HEAD /tc/home.html HTTP/1.1
    Host: www.tribunalconstitucional.pt
    ...
    HTTP/1.1 200 OK
    Connection: Keep-Alive
    Client-response-num: 1
    Keep-Alive: timeout=15, max=100
    Set-Cookie: AF_SID=b672a03f4a0338f035131f6b8034ff33; path=/
    Date: Sun, 16 Oct 2011 16:20:34 GMT
    Last-Modified: Sun, 16 Oct 2011 07:49:25 GMT
    Client-peer: 65.98.99.99.166:80
    Client-date: Sun, 16 Oct 2011 16:20:34 GMT
    Content-Type: text/html
    Server: Apache/1.3.41 (Unix) mod_perl/1.31 mod_ssl/2.8.31 OpenSSL/0.9.8e
    420 bytes
  • 11. HEAD /tc/home.html HTTP/1.1
    Host: www.tribunalconstitucional.pt
    ...
    HTTP/1.1 200 OK
    Connection: Keep-Alive
    Client-response-num: 1
    Keep-Alive: timeout=15, max=100
    Set-Cookie: AF_SID=b672a03f4a0338f035131f6b8034ff33; path=/
    Date: Sun, 16 Oct 2011 16:20:34 GMT
    Last-Modified: Sun, 16 Oct 2011 07:49:25 GMT
    Client-peer: 65.98.99.99.166:80
    Client-date: Sun, 16 Oct 2011 16:20:34 GMT
    Content-Type: text/html
    Server: Apache/1.3.41 (Unix) mod_perl/1.31 mod_ssl/2.8.31 OpenSSL/0.9.8e
    420 bytes
    Mas se setiveralteradoemrelação à cópiaem cache…
    GET /tc/home.html...
  • 12. Cliente
    Servidor
    HEAD ...
    HTTP/1.1 200 OK
  • 13. Cliente
    Servidor
    HEAD ...
    HTTP/1.1 200 OK
    GET ...
    HTTP/1.1 200 OK
  • 14. GET /tc/home.html HTTP/1.1
    Host: www.tribunalconstitucional.pt
    If-Modified-Since: Fri, 14 Oct 2011 19:08:24 GMT
    ...
    HTTP/1.1 200 OK
    Date: Sun, 16 Oct 2011 16:20:34 GMT
    Last-Modified: Sun, 16 Oct 2011 07:49:25 GMT
    Server: Apache/1.3.41 (Unix) mod_perl/1.31 mod_ssl/2.8.31 OpenSSL/0.9.8e
    Set-Cookie: AF_SID=7896d3ac9d40552973a20a4e6cd7ceac; path=/
    Keep-Alive: timeout=15, max=100
    Connection: Keep-Alive
    Transfer-Encoding: chunked
    Content-Type: text/html
    + 40.318 bytes
  • 15. GET /tc/home.html HTTP/1.1
    Host: www.tribunalconstitucional.pt
    If-Modified-Since: Fri, 14 Oct 2011 19:08:24 GMT
    ...
    HTTP/1.1 200 OK
    Date: Sun, 16 Oct 2011 16:20:34 GMT
    Last-Modified: Sun, 16 Oct 2011 07:49:25 GMT
    Server: Apache/1.3.41 (Unix) mod_perl/1.31 mod_ssl/2.8.31 OpenSSL/0.9.8e
    Set-Cookie: AF_SID=7896d3ac9d40552973a20a4e6cd7ceac; path=/
    Keep-Alive: timeout=15, max=100
    Connection: Keep-Alive
    Transfer-Encoding: chunked
    Content-Type: text/html
    + 40.318 bytes
  • 16. GET /tc/home.html HTTP/1.1
    Host: www.tribunalconstitucional.pt
    If-Modified-Since: Sun, 16 Oct 2011 07:49:25 GMT
    ...
    299 bytes
    HTTP/1.1 304 Notmodified
    Connection: Keep-Alive
    Keep-Alive: timeout=15, max=99
    Date: Sun, 16 Oct 2011 18:26:07 GMT
    Client-peer: 65.98.99.166:80
    Etag: "e05af-19db-4a4beb1b“
    Client-date: Sun, 16 Oct 2011 18:26:06 GMT
    Server: Apache/1.3.41 (Unix) mod_perl/1.31 mod_ssl/2.8.31 OpenSSL/0.9.8e
  • 17. Cliente
    Servidor
    GET ...
    HTTP/1.1 200 OK
    HTTP/1.1 304 Notmodified
  • 18. HEAD
    If-Modified-Since
  • 19. “HTTP/1.1 implements a more efficientapproach to thisproblemusingtwonewheaders: If-Modified-Sinceand(...)” (p. 58)
    HEAD
    If-Modified-Since
  • 20. “HTTP/1.1 implements a more efficientapproach to thisproblemusingtwonewheaders: If-Modified-Sinceand(...)” (p. 58)
    HEAD
    If-Modified-Since
  • 21.
  • 22. HEAD
    If-Modified-Since
    http://bit.ly/oNhktc
  • 23. HEAD
    If-Modified-Since
    Ideal para cache
    Alternativa p/ cache
    Recolha de
    listas de recursos
  • 24. HEAD
    If-Modified-Since
    Ideal para cache
    Alternativa p/ cache
    Recolha de
    listas de recursos
  • 25. Leituras associadas
    Web ApplicationArchitecture, Second Edition
    Cap. 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