Closed
Bug 756279
Opened 12 years ago
Closed 12 years ago
Hijack POST redirects for fragments.js
Categories
(Marketplace Graveyard :: Consumer Pages, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
2012-10-11
People
(Reporter: cvan, Assigned: potch)
References
Details
If we get a 301/302 response, let's not do a full page load. Let's just reload the #page fragment.
Comment 1•12 years ago
|
||
marking as p5 - this doesn't sound like a blocker to me, let me know if that's incorrect
Priority: -- → P5
Target Milestone: 2012-05-24 → ---
Reporter | ||
Comment 2•12 years ago
|
||
This affects breadcrumbs and causes extra load on mobile.
Assignee | ||
Comment 3•12 years ago
|
||
This is pretty important for us to have a slick, responsive app experience. It's also really hard. I'll keep poking at it.
Priority: P5 → P3
Comment 5•12 years ago
|
||
What is left here? ETA? Importance?
Assignee | ||
Comment 6•12 years ago
|
||
The full implementation is left, essentially :) The difficulty is that we frequently redirect after a POST, and ajax has a very hard time (pretty much impossible) to follow a 30x response. Been chatting with cvan about possible solutions, but nothing that's made it to implementation yet.
Reporter | ||
Comment 7•12 years ago
|
||
Oh yeah I think the latest idea we were toying with was adding middleware that does something like
if request.is_ajax() and request.method == 'POST' and response.status_code in (301, 302):
return HttpResponse(response, json.dumps({'redirect': location})
and then have fragments.js handle that response and do a fragment refresh.
Comment 8•12 years ago
|
||
This seems like an important bug to fix. We need an owner for this.
Reporter | ||
Comment 9•12 years ago
|
||
Potch and I also discussed how also should work on an expiry for the header so we can do synchronous page refreshes if the header is out of date (after pushes for example).
Assignee | ||
Comment 10•12 years ago
|
||
(In reply to Chris Van Wiemeersch [:cvan] from comment #9)
> Potch and I also discussed how also should work on an expiry for the header
> so we can do synchronous page refreshes if the header is out of date (after
> pushes for example).
Cvan, if you can build out the middleware for this, I'd be happy to wire up fragments.js to handle it. What say ye?
Reporter | ||
Comment 11•12 years ago
|
||
(In reply to Potch [:potch] from comment #10)
> (In reply to Chris Van Wiemeersch [:cvan] from comment #9)
> > Potch and I also discussed how also should work on an expiry for the header
> > so we can do synchronous page refreshes if the header is out of date (after
> > pushes for example).
>
> Cvan, if you can build out the middleware for this, I'd be happy to wire up
> fragments.js to handle it. What say ye?
I'm totes down!
Assignee: thepotch → cvan
Whiteboard: [woomp]
Target Milestone: --- → 2012-10-11
Reporter | ||
Comment 12•12 years ago
|
||
Assignee: cvan → thepotch
Reporter | ||
Comment 13•12 years ago
|
||
Assignee | ||
Comment 14•12 years ago
|
||
she's landed!
https://github.com/mozilla/zamboni/commit/91d2d4e
Thanks to cvan for the middleware!
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•