Skip to content

Commit 11e59ae

Browse files
authored
Fix 302/304 mixup (#260)
1 parent 0a63301 commit 11e59ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ Import your module on the specific page. Note: you'll likely want to use a `cont
207207

208208
## Include a digest of the import map in your ETag
209209

210-
If you're using [ETags](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) generated by Rails helpers like `stale?` or `fresh_when`, you need to include the digest of the import map into this calculation. Otherwise your application will return 302 cache responses even when your JavaScript assets have changed. You can avoid this with something like:
210+
If you're using [ETags](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) generated by Rails helpers like `stale?` or `fresh_when`, you need to include the digest of the import map into this calculation. Otherwise your application will return [304](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/304) cache responses even when your JavaScript assets have changed. You can avoid this with something like:
211211

212212
```ruby
213213
class ApplicationController < ActionController::Base

0 commit comments

Comments
 (0)