diff options
| author | aditya-kapoor <aditya.kapoor@vinsol.com> | 2013-09-01 18:05:04 +0530 |
|---|---|---|
| committer | aditya-kapoor <aditya.kapoor@vinsol.com> | 2013-09-01 18:05:04 +0530 |
| commit | 6b9b0767bf480d53029afeb3f8e86f66e933fb41 (patch) | |
| tree | 62a76c76b8fce484d8a258aceb14ac475f2c94a8 /guides/source/caching_with_rails.md | |
| parent | b27c40637aaf2549f91faec8e87f6d4afa9a7380 (diff) | |
| parent | ab0cbff07ebb5df8c9354fa2b3fd9984e039d2c6 (diff) | |
| download | rails-6b9b0767bf480d53029afeb3f8e86f66e933fb41.tar.gz rails-6b9b0767bf480d53029afeb3f8e86f66e933fb41.tar.bz2 rails-6b9b0767bf480d53029afeb3f8e86f66e933fb41.zip | |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'guides/source/caching_with_rails.md')
| -rw-r--r-- | guides/source/caching_with_rails.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/caching_with_rails.md b/guides/source/caching_with_rails.md index 1e196b0e42..3cf6631c32 100644 --- a/guides/source/caching_with_rails.md +++ b/guides/source/caching_with_rails.md @@ -301,7 +301,7 @@ Conditional GET support Conditional GETs are a feature of the HTTP specification that provide a way for web servers to tell browsers that the response to a GET request hasn't changed since the last request and can be safely pulled from the browser cache. -They work by using the `HTTP_IF_NONE_MATCH` and `HTTP_IF_MODIFIED_SINCE` headers to pass back and forth both a unique content identifier and the timestamp of when the content was last changed. If the browser makes a request where the content identifier (etag) or last modified since timestamp matches the server’s version then the server only needs to send back an empty response with a not modified status. +They work by using the `HTTP_IF_NONE_MATCH` and `HTTP_IF_MODIFIED_SINCE` headers to pass back and forth both a unique content identifier and the timestamp of when the content was last changed. If the browser makes a request where the content identifier (etag) or last modified since timestamp matches the server's version then the server only needs to send back an empty response with a not modified status. It is the server's (i.e. our) responsibility to look for a last modified timestamp and the if-none-match header and determine whether or not to send back the full response. With conditional-get support in Rails this is a pretty easy task: @@ -338,7 +338,7 @@ class ProductsController < ApplicationController end ``` -If you don't have any special response processing and are using the default rendering mechanism (i.e. you're not using respond_to or calling render yourself) then you’ve got an easy helper in fresh_when: +If you don't have any special response processing and are using the default rendering mechanism (i.e. you're not using respond_to or calling render yourself) then you've got an easy helper in fresh_when: ```ruby class ProductsController < ApplicationController |
