#6566 closed (fixed)
newforms-admin does not send all HTTP headers
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.admin | Version: | newforms-admin |
Severity: | Keywords: | nfa-blocker | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When looking at the change list view for a model in Opera (9.23), change something, hit save. Click it again in the list and the old values are still there. Firefox (2.0.0.12) and IE6+7 don't cache the change form.
This may be Opera's problem, but I don't see any cache control headers beeing sent so maybe the default behaviour is just different?
Attachments (1)
Change History (12)
comment:1 by , 17 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 by , 17 years ago
I do not believe it's a cache somewhere between me and the server. But as long as nobody else can reproduce this I won't reopen. So could someone with Opera on Windows please try this?
Note that I go from the change view to the list (by hitting save), click the same entry again and Opera doesn't seem to reload the prepopulated form data. If I click 'Save and continue editing' it works fine.
IMHO it makes sense to prevent caching on the whole admin and it's just a tiny change to the base template :) (see patch).
by , 17 years ago
Attachment: | no-cache.diff added |
---|
Patch that adds a no-cache header to admin/base.html, fixes problem on Opera 9.26 (Windows)
comment:3 by , 17 years ago
I also can't reproduce this, and at any rate all of the admin views apply the never_cache
decorator, which sets the Expires
and Cache-Control
headers to force immediate expiration and forbid caching of the page. If your copy of Opera isn't respecting those (mine does), you've got bigger problems.
comment:4 by , 17 years ago
Thx for the response ubernostrum! Did you test on newforms-admin? Which version of Opera did you use? Which OS?
I tested the headers again with Firebug but I can see no Expires or Cache-Control headers. What I get is this:
Response Headers Date Mon, 31 Mar 2008 12:22:53 GMT Server Apache/2.2.3 (Debian) mod_python/3.2.10 Python/2.4.4 PHP/4.4.4-8+etch4 Vary Cookie Content-Type text/html; charset=utf-8 Keep-Alive timeout=15, max=100 Connection Keep-Alive Transfer-Encoding chunked
So if you too tested on newforms-admin I will have to find out why the never_cache decorator doesn't work on my setup.
comment:5 by , 17 years ago
Ok, I just set up a test-project on the same machine with trunk, result:
Response Headers Date Mon, 31 Mar 2008 12:53:25 GMT Server WSGIServer/0.1 Python/2.4.4 Expires Mon, 31 Mar 2008 12:53:25 GMT Vary Cookie Last-Modified Mon, 31 Mar 2008 12:53:25 GMT Etag 2f62a785bb02ce2522f7e9efe4ec74c0 Cache-Control max-age=0 Content-Type text/html; charset=utf-8
That was the development server while my last post featured apache. So here ist the result from newforms-admin on the development server for comparison. They are both from the admin index page.
Response Headers Date Mon, 31 Mar 2008 12:37:54 GMT Server WSGIServer/0.1 Python/2.4.4 Vary Cookie Content-Type text/html; charset=utf-8
And by the way: Django rocks :)
comment:6 by , 17 years ago
Keywords: | nfa-blocker added |
---|---|
Summary: | Opera caches admin pages → newforms-admin does not send all HTTP headers |
comment:7 by , 17 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
Triage Stage: | Unreviewed → Accepted |
The newforms-admin views have not respected their trunk equivalent decorators, yet. Not sure if this is due to waiting for #6470. However, I was able to replicate the missing headers using Firefox.
comment:8 by , 17 years ago
milestone: | → 1.0 alpha |
---|
comment:9 by , 17 years ago
Does this issue have any kind of priority? The admin interface is totally unusable in this condition. The pragma/no-cache meta tag has no effect in Firefox, Safari, Opera, or Internet Explorer as far as I can tell. I'm also having problems logging in - a message comes up saying I may have cookies disabled so it takes about 3 attempts before I can login, and new objects are still not listed; sometimes no message appears and I'm still not logged in. Logging out is also a problem - any cached page will still appear without having to log in again.
It seems I have to restart the server every time I add a new object just so it gets listed.
(Revision 7691 + pragma/no-cache)
comment:10 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
I can't reproduce with Opera 9 on my mac. This probably means it's a weird upstream cache where you are.