Open
Bug 1064611
Opened 10 years ago
Updated 2 years ago
Allow requesting cached content from nsIWebNavigation
Categories
(Core :: DOM: Navigation, defect)
Tracking
()
NEW
People
(Reporter: wesj, Unassigned)
References
Details
Attachments
(1 file)
9.93 KB,
patch
|
bzbarsky
:
feedback+
mconley
:
feedback+
|
Details | Diff | Splinter Review |
For Fennec, we'd like some way for users to get to cache content when they're offline. That may be through a button on the error page ("Load a cached version of this page"), or maybe by just using cached content when we detect there's no network (or both?). Currently, Channels and requests have a way to requested cache content, but there's nothing exposed to nsIWebNavigation. I'd like to expose one.
Reporter | ||
Comment 1•10 years ago
|
||
bz, I heard you talked to finkle about this a bit once. Ignoring the Fennec bits, does this look like the right track?
Attachment #8486107 -
Flags: feedback?(bzbarsky)
Comment 2•10 years ago
|
||
Adding some other bugs that could use this feature. A link to some recent buzz about this kind of feature in Chrome: http://addyosmani.com/blog/offline-mode-chrome/
Comment 3•10 years ago
|
||
Comment on attachment 8486107 [details] [diff] [review] WIP Patch >+++ b/docshell/base/nsDocShellLoadTypes.h The change to this file is not needed. The interaction with the LOAD_FLAGS_BYPASS_CACHE flag needs to at least be documented. Ideally, one or the other would be explicitly ignored by masking it off if the other is set, because I expect that setting both nsIRequest::LOAD_FROM_CACHE and nsIRequest::LOAD_BYPASS_CACHE on the channel will at best do something random and at worst make necko very confused. Apart from that this looks reasonable.
Attachment #8486107 -
Flags: feedback?(bzbarsky) → feedback+
Reporter | ||
Comment 4•10 years ago
|
||
I was looking into writing some tests for this and noticed that setting this on the webnavigation object won't actually load pages in subframes from the cache. Conversely, setting it as defaultLoadFlags of the docshell will, so I think maybe that's a better approach for us anyway. I'm chasing that approach unless someone tells me its crazy.
Updated•10 years ago
|
Attachment #8486107 -
Flags: feedback?(mconley)
Comment 5•10 years ago
|
||
Comment on attachment 8486107 [details] [diff] [review] WIP Patch Review of attachment 8486107 [details] [diff] [review]: ----------------------------------------------------------------- The docshell changes look reasonable to me. I'm not 100% sure when adding constants like that, but do you need to bump the UUID's on the IDL's you've changed?
Attachment #8486107 -
Flags: feedback?(mconley) → feedback+
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•