Comment (by eykd):
Shouldn't this also set the `Pragma: no-cache` header?
--
Ticket URL: <https://code.djangoproject.com/ticket/13008#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by harm):
I think it should not be needed. {{{ Pragma: no-cache }}} is intended for
http requests, not http responses. (See
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9)
--
Ticket URL: <https://code.djangoproject.com/ticket/13008#comment:10>
Comment (by SmileyChris):
More explicitly,
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.32 says:
> Note: because the meaning of "Pragma: no-cache as a response
> header field is not actually specified, it does not provide a
> reliable replacement for "Cache-Control: no-cache" in a response
I can't see `must-revalidate` being necessary, either. But maybe I'm
overlooking something.
--
Ticket URL: <https://code.djangoproject.com/ticket/13008#comment:11>
* cc: net147 (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/13008#comment:12>
Comment (by harm):
confirmed, {{{must-revalidate}}} is not necessary.
tested adding cache control headers with
{{{
@cache_control(max_age=0, no_cache=True, no_store=True)
}}}
on FF 19.0 + FF 19.02 + chrome 25 (on mac)
A 'back' button in the browser, reloads a view.
So I think your patch
[https://code.djangoproject.com/attachment/ticket/13008/13008.diff
13008.diff] is correct.
--
Ticket URL: <https://code.djangoproject.com/ticket/13008#comment:13>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/13008#comment:14>
* owner: nobody => susan
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/13008#comment:15>
Comment (by susan):
Where should I write a test? Should it be in `cache/tests.py`? The
function `add_never_cache_headers` is never tested in the`tests/`
directory.
--
Ticket URL: <https://code.djangoproject.com/ticket/13008#comment:16>
Comment (by thenewguy):
This issue is related to https://code.djangoproject.com/ticket/23755
(patch_cache_control should special case "no-cache")
--
Ticket URL: <https://code.djangoproject.com/ticket/13008#comment:17>
* owner: susan => mbertheau
Comment:
PR with test in https://github.com/django/django/pull/4565
--
Ticket URL: <https://code.djangoproject.com/ticket/13008#comment:18>
* version: 1.2-beta => master
* needs_tests: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/13008#comment:19>
* stage: Accepted => Ready for checkin
Comment:
The patch looks rather good. Tim, a last review?
--
Ticket URL: <https://code.djangoproject.com/ticket/13008#comment:20>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"4a438e400b7ce0ab9d0b6876196cbe8d620a4171" 4a438e4]:
{{{
#!CommitTicketReference repository=""
revision="4a438e400b7ce0ab9d0b6876196cbe8d620a4171"
Fixed #13008 -- Added more Cache-Control headers to never_cache()
decorator.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/13008#comment:21>
Comment (by Tim Graham <timograham@…>):
In [changeset:"b51086d57313e7ea857f4b96b62d25e600ee0a8d" b51086d]:
{{{
#!CommitTicketReference repository=""
revision="b51086d57313e7ea857f4b96b62d25e600ee0a8d"
[1.8.x] Fixed #13008 -- Added more Cache-Control headers to never_cache()
decorator.
Backport of 4a438e400b7ce0ab9d0b6876196cbe8d620a4171 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/13008#comment:22>
Comment (by Tim Graham <timograham@…>):
In [changeset:"a53175392ff753cc53a4a2d33a5852d113e67363" a5317539]:
{{{
#!CommitTicketReference repository=""
revision="a53175392ff753cc53a4a2d33a5852d113e67363"
Refs #13008 -- Forwardported 1.8.8 release note.
Forwardport of b51086d57313e7ea857f4b96b62d25e600ee0a8d from stable/1.8.x
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/13008#comment:23>
Comment (by Tim Graham <timograham@…>):
In [changeset:"85159b98196e129e6ad493b503f3b49012c280ff" 85159b9]:
{{{
#!CommitTicketReference repository=""
revision="85159b98196e129e6ad493b503f3b49012c280ff"
[1.9.x] Refs #13008 -- Forwardported 1.8.8 release note.
Forwardport of b51086d57313e7ea857f4b96b62d25e600ee0a8d from stable/1.8.x
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/13008#comment:24>