Closed Bug 1471602 Opened 7 years ago Closed 7 years ago

Appcache does not work in combination with Javascript module (ES6)

Categories

(Core :: Networking: Cache, defect)

60 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 687758
Tracking Status
firefox-esr60 --- wontfix
firefox61 --- wontfix
firefox62 --- wontfix
firefox63 --- wontfix

People

(Reporter: klaus, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0 Build ID: 20180605171542 Steps to reproduce: - go to https://asterics.github.io/AsTeRICS-Ergo-Grid/package/static/ - site with blue grid with words appears - go offline - refresh the page (F5) - page is broken, no blue grid anymore - error message in console: failed to load module "https://asterics.github.io/AsTeRICS-Ergo-Grid/package/static/build/asterics-grid.bundle.js" Actual results: the page does not work offline, but it should work because it uses AppCache (see https://developer.mozilla.org/de/docs/Web/HTML/Using_the_application_cache). Expected results: Page should work offline in the same way as offline. Tested this in: - Chrome 67.0.3396.87 - Edge 41.16299.492.0 / 16.16299 - IE 11.492 In all other browsers the page also works offline, Firefox is the only exception.
Hi, I've managed to reproduce this issue on Windows Pro (64-bit) using Firefox 60.0 (2018-06-05)(64-bit), Firefox 61.0 (2018-06-21)(64-bit), Firefox Beta 62.0b3 (2018-06-28)(64-bit) and Firefox 63.0a1 (2018-07-01)(64-bit). Thanks for reporting.
Status: UNCONFIRMED → NEW
Component: Untriaged → Networking: Cache
Ever confirmed: true
Product: Firefox → Core
Honza, can you please have a look at it and decide whether this is something we want to fix?
Flags: needinfo?(honzab.moz)
The script is being loaded as anonymous (=cookie-less and in a different namespace) thanks the "module" type. We don't cache anonymous requests in appcache unless cross-origin. This is a combo of bug 687758 and bug 1285476 (sec issue). This issue is actually a spec problem of appcache (no instructions for how to handle anonymous loads). I believe this is duplicate of bug 687758 - wontfix. Appcache is an old and buggy technology. We encourage to use Service Workers instead.
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: needinfo?(honzab.moz)
Resolution: --- → DUPLICATE
ok, thanks for the info. Service workers however are not supported at all in IE, so I would have to drop IE support (maybe I should do).
Other option could be to serve the script from a different domain, so that it will be cached in appcache duplicated in the anonymous namespace.
Ok, serving from other domain is currently not possible, but thanks for the hint. >> This issue is actually a spec problem of appcache (no instructions for how to handle anonymous loads). << However, many other browsers (I've tested Chrome, Edge, IE) seem to implement it differently.
(In reply to Benjamin Klaus from comment #6) > However, many other browsers (I've tested Chrome, Edge, IE) seem to > implement it differently. We do behave differently, because the default behavior is considered a security risk, see bug 1285476
You need to log in before you can comment on or make changes to this bug.