Closed Bug 756279 Opened 12 years ago Closed 12 years ago

Hijack POST redirects for fragments.js

Categories

(Marketplace Graveyard :: Consumer Pages, defect, P3)

defect

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.
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 → ---
This affects breadcrumbs and causes extra load on mobile.
Blocks: 756282, 758445
Whiteboard: [woomp]
No longer blocks: 752013
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
What is left here? ETA? Importance?
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.
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.
This seems like an important bug to fix. We need an owner for this.
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).
(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?
(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
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.