Closed
Bug 758507
Opened 12 years ago
Closed 12 years ago
Prefetch (and cache?) assets and fragment responses
Categories
(Marketplace Graveyard :: Consumer Pages, enhancement, P4)
Tracking
(Not tracked)
RESOLVED
FIXED
2012-06-07
People
(Reporter: cvan, Assigned: potch)
References
Details
To make things snappier, especially on mobile where it counts, we need to prefetch assets and fragment responses. We'll want to follow links and prefetch content before links are even clicked by the user.
A few ideas come to mind:
* <link rel="prefetch"> (I'm skeptical)
* sessionStorage (or localStorage with an expiry) to follow and prefetch links on the page (since both block on reads+writes maybe we can use IndexedDB if supported by user agent)
* store a few responses in <script type="text/template"> in each fragment and load them when we need them
* load and cache a bunch of responses in a simple object (assuming pushState is available and we don't do any synchronous page loads during the user's session - bug 756279 will need to be addressed so we don't get lost after redirects/POSTs)
Also, a few questions come to mind:
* Which pages/images do we prefetch (Featured links on homepage, page 2 search results when viewing page 1, etc.)?
* At what point do the lazy-loading (document ready, when the user is idle [no touch/mouse events for a while], upon new fragment/page load, etc.)?
If anyone has concerns, preferences, or brilliance now's your time to shine!
(Related: Bug 753153 is for pushing the innerHTML of the fragment into the history stack so we don't do redundant GETs.)
Reporter | ||
Comment 1•12 years ago
|
||
https://github.com/mozilla/zamboni/commit/a09131cd
Thanks, potch! Looking good.
Assignee: nobody → thepotch
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2012-06-07
You need to log in
before you can comment on or make changes to this bug.
Description
•