Closed
Bug 1237783
Opened 9 years ago
Closed 9 years ago
Add a pref to disable appcache
Categories
(Core :: Networking: HTTP, defect)
Core
Networking: HTTP
Tracking
()
RESOLVED
FIXED
mozilla47
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: ehsan.akhgari, Assigned: mayhemer)
References
Details
Attachments
(1 file, 1 obsolete file)
3.76 KB,
patch
|
mayhemer
:
review+
|
Details | Diff | Splinter Review |
The pref needs to disable using appcache at the HTTP level, and also remove the DOM APIs.
Assignee | ||
Updated•9 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•9 years ago
|
||
So, we already have following prefs for this:
- browser.cache.offline.enable
- offline-apps.allow_by_default
- browser.offline-apps.notify
All are now by default true.
Switching the *first two to false* will cause appcache be bypassed: no notification for update, no automatic updates (even for already cached content), no loading from appcache.
This tho causes "Offline mode" error when loading pages that have been offline-cached before this pref switch. We need to patch that.
Assignee | ||
Comment 2•9 years ago
|
||
- fixes "offline mode" error page for previously offline-cached pages
- those pages now load from net as normal web pages
Attachment #8714940 -
Flags: review?(ehsan)
Assignee | ||
Comment 3•9 years ago
|
||
(In reply to Honza Bambas (:mayhemer) from comment #1)
> Switching the *first two to false*
With the fix the prompt has woken up. *All three prefs* has to be switched to false.
Reporter | ||
Comment 4•9 years ago
|
||
We also need a pref for window.applicationCache and friends, right?
Reporter | ||
Comment 5•9 years ago
|
||
Comment on attachment 8714940 [details] [diff] [review]
v1
Review of attachment 8714940 [details] [diff] [review]:
-----------------------------------------------------------------
Is this not an issue in other places where we access nsIApplicationCacheChannel?
Attachment #8714940 -
Flags: review?(ehsan) → review+
Assignee | ||
Comment 6•9 years ago
|
||
(In reply to :Ehsan Akhgari from comment #4)
> We also need a pref for window.applicationCache and friends, right?
I assume you want to make the window.applicationCache undefined? I think there are no friends, this is the only object related to appcache we expose, AFAIK.
These days I don't know how to do this. Can you advise please?
(In reply to :Ehsan Akhgari from comment #5)
> Is this not an issue in other places where we access
> nsIApplicationCacheChannel?
Not sure what you mean, what is the concern. The prefs when disabled do:
- browser.cache.offline.enable -> makes the appcache portion of HTTP cache disabled (cannot find existing entries, cannot create new ones, means stuff doesn't load from appcache at the first place)
- offline-apps.allow_by_default -> doesn't auto-grant offline-app permission on <html manifest="manifest">, so that we don't store appcache manifest and the resources
- browser.offline-apps.notify -> disables the notification "this app wants to store offline" that pops up when allow_by_default = false
Nothing else. Consumers are OK to not find what they need on that interface.
Reporter | ||
Comment 8•9 years ago
|
||
(In reply to Honza Bambas (:mayhemer) from comment #6)
> (In reply to :Ehsan Akhgari from comment #4)
> > We also need a pref for window.applicationCache and friends, right?
>
> I assume you want to make the window.applicationCache undefined? I think
> there are no friends, this is the only object related to appcache we expose,
> AFAIK.
>
> These days I don't know how to do this. Can you advise please?
Adding a [Pref] annotation in the WebIDL file should do it: <https://developer.mozilla.org/en-US/docs/Mozilla/WebIDL_bindings#Pref>
> (In reply to :Ehsan Akhgari from comment #5)
> > Is this not an issue in other places where we access
> > nsIApplicationCacheChannel?
>
> Not sure what you mean, what is the concern. The prefs when disabled do:
>
> - browser.cache.offline.enable -> makes the appcache portion of HTTP cache
> disabled (cannot find existing entries, cannot create new ones, means stuff
> doesn't load from appcache at the first place)
> - offline-apps.allow_by_default -> doesn't auto-grant offline-app permission
> on <html manifest="manifest">, so that we don't store appcache manifest and
> the resources
> - browser.offline-apps.notify -> disables the notification "this app wants
> to store offline" that pops up when allow_by_default = false
>
> Nothing else. Consumers are OK to not find what they need on that interface.
OK, great!
Flags: needinfo?(ehsan)
Assignee | ||
Comment 9•9 years ago
|
||
and here we go, with windows.applicationCache object being preffed as well (tested both pref states)
Attachment #8714940 -
Attachment is obsolete: true
Attachment #8716340 -
Flags: review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 10•9 years ago
|
||
Keywords: checkin-needed
Comment 11•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in
before you can comment on or make changes to this bug.
Description
•