Skip to content

Instantly share code, notes, and snippets.

@NeoElit
Last active May 16, 2016 19:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NeoElit/dd8d9f22142db12cee077723b7cd8bf5 to your computer and use it in GitHub Desktop.
Save NeoElit/dd8d9f22142db12cee077723b7cd8bf5 to your computer and use it in GitHub Desktop.
HTTP Cache
#Request headers---------------------------------
Host: localhost:3000
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:45.0) Gecko/20100101 Firefox/45.0
Accept: text/html, application/xhtml+xml, application/xml
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
X-XHR-Referer: http://localhost:3000/business
Referer: http://localhost:3000/business
Cookie: ******************************************
Connection: keep-alive
If-Modified-Since: Mon, 16 May 2016 16:19:48 GMT
If-None-Match: "3146b3e77d90f1cde5101d9e17224367"
#Response header-------------------------------------
Cache-Control: max-age=0, private, must-revalidate
Connection: close
Etag: "3146b3e77d90f1cde5101d9e17224367"
Last-Modified: Mon, 16 May 2016 16:19:48 GMT
Server: thin
Set-Cookie: ***********************
X-Frame-Options: SAMEORIGIN
X-Request-Id: 664dacb6-b215-488b-a3ea-497659e22c46
X-Runtime: 0.029230
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
#Request headers------------------------------------
Host: test.gridlle.com
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:45.0) Gecko/20100101 Firefox/45.0
Accept: text/html, application/xhtml+xml, application/xml
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
X-XHR-Referer: http://test.gridlle.com/business
Referer: http://test.gridlle.com/business
Cookie: *************************************
Connection: keep-alive
If-Modified-Since: Mon, 16 May 2016 16:19:48 GMT
If-None-Match: W/"3146b3e77d90f1cde5101d9e17224367"
#Response header-----------------------------------
Cache-Control: max-age=0, private, must-revalidate
Connection: keep-alive
Content-Encoding: gzip
Content-Type: text/html; charset=utf-8
Date: Mon, 16 May 2016 19:02:43 GMT
Etag: W/"3146b3e77d90f1cde5101d9e17224367"
Last-Modified: Mon, 16 May 2016 16:19:48 GMT
Server: nginx/1.8.0 + Phusion Passenger 5.0.22
Set-Cookie: ***********************
Status: 200 OK
Transfer-Encoding: chunked
X-Frame-Options: SAMEORIGIN
X-Powered-By: Phusion Passenger 5.0.22
X-Request-Id: c2fcaf8a-59e5-4f3b-bef3-c0409ff37311
X-Runtime: 0.004938
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
class StaticPagesController < ApplicationController
def business
fresh_when(etag: "c2fd5566bdfc7e3dca4c74a4156321d85b19d5a50073d525d4b2ba010d0365c3", last_modified: DateTime.parse("2016-05-16T16:19:48+00:00"))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment