-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error loading from the disk cache pages obtained by blocking remote fonts. #229
Comments
This is unfortunately a side effect of the fix to #42 -- in which the workaround suggested by Firefox devs in https://bugzilla.mozilla.org/show_bug.cgi?id=1376932 was used. |
I am experimenting and it seems if I just use |
I am going to revert the fix here -- the side effects are undesirable for whoever does not care to work in offline mode. Since either ways cause side effects which may not be acceptable to group of users, I will add an advanced setting to let users configure how uBO should affect caching for the purpose of dealing with https://bugzilla.mozilla.org/show_bug.cgi?id=1376932. The default value will be the one used before, i.e. the one causing the issue here. New advanced setting: Default value: If using
If using
This new advanced setting will be removed once https://bugzilla.mozilla.org/show_bug.cgi?id=1376932 is fixed. |
Firefox bug has been closed. I will like to test, but don't see a way to configure |
Related feedback: - uBlockOrigin/uBlock-issues#229 (comment) Setting `cacheControlForFirefox1376932` to `unset` will prevent modification of the `Cache-Control` header.
@gwarser Were you able to test afterall ? |
Testing all the time, and I think it works.
|
Hmmm. Something is racing. When testing on |
HTML filtering is not applied on session restore: |
No glitches when using CSP
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The referenced Bugzilla issue (https://bugzilla.mozilla.org/show_bug.cgi?id=1376932) was closed with status RESOLVED FIXED, 5 years ago. As I understand, websites not being available offline is not the only downside of this setting, but also more network usage which is quite bad for those on a mobile data connection, and besides that battery drain when the user is on a slow connection, limited by the network provider. |
@gorhill Sorry, is the one in this reddit thread related to this issue? OP also used https://old.reddit.com/r/uBlockOrigin/comments/1dz6du7/i_managed_to_break_firefoxs_asset_caching/ |
Not directly related, the issue is injecting a CSP header in non-document resources, this also happen in Chromium as can be seen in logger when forcing a reload with cache bypass. Chromium is seemingly unaffected because it does not have that special code path taken in Firefox which also inject a cache invalidation header. I am not sure how far in the past is the regression, I believe at some point a test for document resource might have been removed, leading to the current issue of injecting CSP header in non-document resource. I will work on a fix. This is the regression, a test for document resource was removed, leading to the reported issue: |
Related feedback: uBlockOrigin/uBlock-issues#229 (comment) https://old.reddit.com/r/uBlockOrigin/comments/1dz6du7/ Regression from: 7c3e060c01
Prerequisites
Description
When uBlock blocks remote fonts, the downloaded pages (except images) in the disk cache are not stored correctly: they are not then loaded offline, but should be loaded.
A specific URL where the issue occurs
https://example.com/
Steps to Reproduce
7.a. Re-open the tab with this page.
7.b.1. "Reload the page bypassing the cache" (Ctrl+F5). (The result is not important: in fact, in offline mode, this will reload the page from the disk cache without checking it.)
7.b.2. "Reload this Page with cache" (F5).
The page will not load from the cache, but will report a "browser is offline mode" error. But the page should load.
Disregarding the "no remote fonts" is changing the case, but I think that the blocking is needed. Cache is also needed.
Expected behavior:
The page will load from the cache.
Actual behavior:
The page will not load from the cache.
Your environment
The text was updated successfully, but these errors were encountered: