SlideShare a Scribd company logo
Cache is the king
Cache
Maciej Mendrela
<url scheme>://<host>:<port>/<path>?query/#<frag>
uniform resource locator
(start line) GET /BUILD/ASSETS/IMAGES/LOGO.PNG HTTP/1.1
HOST: WWW.EDRONE.ME 80
http://edrone.me/build/assets/images/logo.png
MIME TYPE
application/javascript
Request message
[method] [url] [version]
[headers]
[body]
Full request
GET / HTTP/1.1
Host: server.com
Connection: keep-alive
User-Agent: Mozilla/5.0(Windows NT 6.1; WOW64) Chrome/16.0.912.75
Safari/535.7
Accept : text/html, application/xhtml+xml,application/xml;=0.9,*/*;q=0.8
Referer : http://www.google.com/url?&q=edrone
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,uft-8;q=0.7,*;q=0.3
Response message
[version] [status] [reason]
[headers]
[body]
Full response
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html, charset=utf-8
Server: Microsoft-IIS/7.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Sat, 14 Feb 2003 04:00:08 GMT
Content-Lenght:17151
<html>
...content
</html>
Status codes categories
Range
•100-199
•200-299
•300-399
•400-499
•500-599
Category
•Informational
•Successful
•Redirection
•Client Error
•Server Error
Popular one’s
Code/Reason
•200/OK
•301/Moved Permanently
•302/Moved Temporaily
•304/Not Modifed
•400/Bad Request
•401/Unauthoized
•403/Forbidden
•404/Not found
•500/Internal Server Error
•503/Service Unavailable
Description
•Success!
•Resource moved,don’t check here again
•Resource moved, but check here again
•Resource hasn’t changed since last retrival
•Bad syntax?
•Client might need to authenticate
•Refused access
•Resource doesn’t exist
•Something went wrong during processing
•Server will not recive the request
Cache-Control
Public
vs
Private
Max-Age = 0
vs
No-Cache
Conditional request headers
•Expect
•If-Match
•If-Modified-Since
•If-None-Match
•If-Range
•If-Unmodified-Since
•Range
•Allows client to list server behaviors that it requires
for a request
•Gets the document if the entity tag matches the
current entity tag for the document
•Restricts the request unless the resources has been
modified since the specified date
•Gets the document if the entity tags supplied do not
match those of the current document
•Allows a conditional request for a range of a
document
•Restricts the request unless the resource has not
been modified since the specified date
•Request a specific range of a resource, if the server
support range request
Apache modules
mod_expires
•ExpiresActive On
•ExpiresByType image/jpg "access plus 1 year"
•ExpiresByType image/jpeg "access plus 1 year„
•ExpiresByType text/css "access plus 1 month„
•ExpiresByType application/pdf "access plus 1
month"
•ExpiresByType text/x-javascript "access plus 1
month"
•ExpiresByType application/x-shockwave-flash
"access plus 1 month"
•ExpiresByType image/x-icon "access plus 1 year„
•ExpiresDefault "access plus 2 days"
mod_headers
•<Files *.php>
•Header set Cache-Control
public,max-age=3600 </Files>
•<Files *.xml>
•Header set Cache-Control
"no-cache, no-store, must-
revalidate, max-age=0"
•</Files>
Thank You!

More Related Content

PPT
High Performance Wordpress: “Faster, Cheaper, Easier : Pick Three”
Valent Mustamin
 
PDF
04 web optimization
Nguyen Duc Phu
 
PDF
HTML5 e Css3 - 8 | WebMaster & WebDesigner
Matteo Magni
 
PPT
Zend Con 2008 Slides
mkherlakian
 
PPT
Drupal Performance - SerBenfiquista.com Case Study
hernanibf
 
PPTX
Curl Tutorial
Ankireddy Polu
 
KEY
Hosting Client Websites on a WordPress Multisite Network
peterwilsoncc
 
PPT
Linux System Administration - Web Server and squid setup
Sreenatha Reddy K R
 
High Performance Wordpress: “Faster, Cheaper, Easier : Pick Three”
Valent Mustamin
 
04 web optimization
Nguyen Duc Phu
 
HTML5 e Css3 - 8 | WebMaster & WebDesigner
Matteo Magni
 
Zend Con 2008 Slides
mkherlakian
 
Drupal Performance - SerBenfiquista.com Case Study
hernanibf
 
Curl Tutorial
Ankireddy Polu
 
Hosting Client Websites on a WordPress Multisite Network
peterwilsoncc
 
Linux System Administration - Web Server and squid setup
Sreenatha Reddy K R
 

What's hot (20)

PPTX
Php push notifications
Mohammed Shurrab
 
PDF
WordPress mit Composer und Git verwalten
Walter Ebert
 
PDF
Building Real-Time Applications with Android and WebSockets
Sergi Almar i Graupera
 
PDF
Integrating Files Into Drupal 7 Authoring Workflow
Matt Mendonca
 
PDF
Die .htaccess richtig nutzen
Walter Ebert
 
PDF
2008 MySQL Conference Recap
Chris Barber
 
PDF
HTTPS + Let's Encrypt
Walter Ebert
 
PDF
Using Vagrant for Local WordPress Development
slicejack
 
PDF
DiscoJuice
Andreas Åkre Solberg
 
PPTX
Take Command of WordPress With WP-CLI at WordCamp Long Beach
Diana Thompson
 
PPTX
TriDUG WebFM Presentation
cgmonroe
 
PDF
WebSockets with Spring 4
Sergi Almar i Graupera
 
PDF
EasyEngine - Command-Line tool to manage WordPress Sites on Nginx
rtCamp
 
PDF
Docker
Geng-Dian Huang
 
TXT
Tantan
DjSir Riquelme
 
PDF
Стажировка 2015. Разработка. Занятие 5. Использование nginx
7bits
 
PDF
Drupal7 MEMCACHE
Pankaj Chauhan
 
PDF
Modern web application network architecture
Marc Bächinger
 
ODP
Optimizing Drupal Performance. Tips and Tricks
Timur Kamanin
 
PDF
Web tech 101
Dan Phiffer
 
Php push notifications
Mohammed Shurrab
 
WordPress mit Composer und Git verwalten
Walter Ebert
 
Building Real-Time Applications with Android and WebSockets
Sergi Almar i Graupera
 
Integrating Files Into Drupal 7 Authoring Workflow
Matt Mendonca
 
Die .htaccess richtig nutzen
Walter Ebert
 
2008 MySQL Conference Recap
Chris Barber
 
HTTPS + Let's Encrypt
Walter Ebert
 
Using Vagrant for Local WordPress Development
slicejack
 
Take Command of WordPress With WP-CLI at WordCamp Long Beach
Diana Thompson
 
TriDUG WebFM Presentation
cgmonroe
 
WebSockets with Spring 4
Sergi Almar i Graupera
 
EasyEngine - Command-Line tool to manage WordPress Sites on Nginx
rtCamp
 
Стажировка 2015. Разработка. Занятие 5. Использование nginx
7bits
 
Drupal7 MEMCACHE
Pankaj Chauhan
 
Modern web application network architecture
Marc Bächinger
 
Optimizing Drupal Performance. Tips and Tricks
Timur Kamanin
 
Web tech 101
Dan Phiffer
 
Ad

Viewers also liked (9)

TXT
Ppt url
Khälïfå Bhati
 
PPT
Webtech1b - hello 123 123
Gunjan Juyal
 
PPT
URL JS
naly01
 
PPT
Url and protocol
Waheed Iqbal Boss
 
PPTX
Basics of internet
Noman Rajput
 
PDF
Url
bhylenia
 
PPT
Url Presentation
sanniii
 
PPT
Url Ppt
empresacrisama2
 
Webtech1b - hello 123 123
Gunjan Juyal
 
URL JS
naly01
 
Url and protocol
Waheed Iqbal Boss
 
Basics of internet
Noman Rajput
 
Url Presentation
sanniii
 
Ad

Similar to Cache is the king (20)

KEY
Fearless HTTP requests abuse
Luis Cipriani
 
PPTX
Александр Сергиенко, Senior Android Developer, DataArt
Alina Vilk
 
PDF
Developing Cacheable PHP Applications - PHP SP 2024
Thijs Feryn
 
PDF
Integrated Cache on Netscaler
Mark Hillick
 
PDF
HTTP cache @ PUG Rome 03-29-2011
Alessandro Nadalin
 
PDF
Caching on the web
Jean Carlo Emer
 
PDF
HTTP headers that will make your website go faster
Thijs Feryn
 
PDF
Caching. api. http 1.1
Artjoker Digital
 
PDF
Varnish
Fabien Potencier
 
PPTX
cache concepts and varnish-cache
Marc Cortinas Val
 
PDF
Charles
Keegan Street
 
PDF
Thijs Feryn - Leverage HTTP to deliver cacheable websites - Codemotion Berlin...
Codemotion
 
PDF
Thijs Feryn - Leverage HTTP to deliver cacheable websites - Codemotion Berlin...
Codemotion
 
PPTX
Caching in Drupal 8
valuebound
 
PDF
PhpTour Lyon 2014 - Transparent caching & context aware http cache
André Rømcke
 
PDF
Caching the Uncacheable
danrot
 
PDF
HTTP Caching in Web Application
Martins Sipenko
 
PDF
Http caching 101 and a bit of CacheCow
Ali Kheyrollahi
 
PPTX
Caching
saravanan_k83
 
PDF
From Cache to Ca$h - Advanced use of WP Cache - Andrea Cardinali
Andrea Cardinali
 
Fearless HTTP requests abuse
Luis Cipriani
 
Александр Сергиенко, Senior Android Developer, DataArt
Alina Vilk
 
Developing Cacheable PHP Applications - PHP SP 2024
Thijs Feryn
 
Integrated Cache on Netscaler
Mark Hillick
 
HTTP cache @ PUG Rome 03-29-2011
Alessandro Nadalin
 
Caching on the web
Jean Carlo Emer
 
HTTP headers that will make your website go faster
Thijs Feryn
 
Caching. api. http 1.1
Artjoker Digital
 
cache concepts and varnish-cache
Marc Cortinas Val
 
Charles
Keegan Street
 
Thijs Feryn - Leverage HTTP to deliver cacheable websites - Codemotion Berlin...
Codemotion
 
Thijs Feryn - Leverage HTTP to deliver cacheable websites - Codemotion Berlin...
Codemotion
 
Caching in Drupal 8
valuebound
 
PhpTour Lyon 2014 - Transparent caching & context aware http cache
André Rømcke
 
Caching the Uncacheable
danrot
 
HTTP Caching in Web Application
Martins Sipenko
 
Http caching 101 and a bit of CacheCow
Ali Kheyrollahi
 
Caching
saravanan_k83
 
From Cache to Ca$h - Advanced use of WP Cache - Andrea Cardinali
Andrea Cardinali
 

Recently uploaded (20)

PPTX
原版北不列颠哥伦比亚大学毕业证文凭UNBC成绩单2025年新版在线制作学位证书
e7nw4o4
 
PDF
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
PPTX
办理方法西班牙假毕业证蒙德拉贡大学成绩单MULetter文凭样本
xxxihn4u
 
PDF
KIPER4D situs Exclusive Game dari server Star Gaming Asia
hokimamad0
 
PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
APNIC
 
PPTX
Crypto Recovery California Services.pptx
lionsgate network
 
PPTX
The Monk and the Sadhurr and the story of how
BeshoyGirgis2
 
PDF
LOGENVIDAD DANNYFGRETRRTTRRRTRRRRRRRRR.pdf
juan456ytpro
 
PPTX
Google SGE SEO: 5 Critical Changes That Could Wreck Your Rankings in 2025
Reversed Out Creative
 
PDF
PDF document: World Game (s) Great Redesign.pdf
Steven McGee
 
PDF
Data Protection & Resilience in Focus.pdf
AmyPoblete3
 
PPTX
Pengenalan perangkat Jaringan komputer pada teknik jaringan komputer dan tele...
Prayudha3
 
PDF
UI/UX Developer Guide: Tools, Trends, and Tips for 2025
Penguin peak
 
PDF
LB# 820-1889_051-7370_C000.schematic.pdf
matheusalbuquerqueco3
 
PPTX
Blue and Dark Blue Modern Technology Presentation.pptx
ap177979
 
PPTX
B2B_Ecommerce_Internship_Simranpreet.pptx
LipakshiJindal
 
PPTX
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
PPT
Introduction to dns domain name syst.ppt
MUHAMMADKAVISHSHABAN
 
PPTX
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
PPTX
AI ad its imp i military life read it ag
ShwetaBharti31
 
原版北不列颠哥伦比亚大学毕业证文凭UNBC成绩单2025年新版在线制作学位证书
e7nw4o4
 
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
办理方法西班牙假毕业证蒙德拉贡大学成绩单MULetter文凭样本
xxxihn4u
 
KIPER4D situs Exclusive Game dari server Star Gaming Asia
hokimamad0
 
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
APNIC
 
Crypto Recovery California Services.pptx
lionsgate network
 
The Monk and the Sadhurr and the story of how
BeshoyGirgis2
 
LOGENVIDAD DANNYFGRETRRTTRRRTRRRRRRRRR.pdf
juan456ytpro
 
Google SGE SEO: 5 Critical Changes That Could Wreck Your Rankings in 2025
Reversed Out Creative
 
PDF document: World Game (s) Great Redesign.pdf
Steven McGee
 
Data Protection & Resilience in Focus.pdf
AmyPoblete3
 
Pengenalan perangkat Jaringan komputer pada teknik jaringan komputer dan tele...
Prayudha3
 
UI/UX Developer Guide: Tools, Trends, and Tips for 2025
Penguin peak
 
LB# 820-1889_051-7370_C000.schematic.pdf
matheusalbuquerqueco3
 
Blue and Dark Blue Modern Technology Presentation.pptx
ap177979
 
B2B_Ecommerce_Internship_Simranpreet.pptx
LipakshiJindal
 
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
Introduction to dns domain name syst.ppt
MUHAMMADKAVISHSHABAN
 
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
AI ad its imp i military life read it ag
ShwetaBharti31
 

Cache is the king