Skip to content
This repository was archived by the owner on Sep 19, 2020. It is now read-only.

frame-blocked content require hard refresh (with cache clear) once allowed #189

Open
9 tasks done
Porkepix opened this issue Oct 9, 2019 · 11 comments
Open
9 tasks done
Labels
enhancement New feature or request

Comments

@Porkepix
Copy link

Porkepix commented Oct 9, 2019

Prerequisites

  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue
  • This is not a support issue or a question
    • Support issues and questions are handled at /r/uMatrix
  • I tried to reproduce the issue when...
    • uMatrix is the only extension
    • uMatrix with default lists/settings
    • using a new, unmodified browser profile
  • I am running the latest version of uMatrix
  • I checked the documentation to understand that the issue I report is not a normal behavior
  • I used the logger to rule out that the issue is caused by my ruleset

Description

Most of the time, even probably every time there's a blocked frame, after allowing this frame and doing a simple refresh, the frame is still missing and replaced by a placeholder.
User needs to do one, sometimes more hard refresh (ctrl + shift + r) with cache cleaning to actually get the frame to be displayed.

A specific URL where the issue occurs

Most of the websites using SaaS recruiting platforms for example, such as Greenhouse.
See here for example: https://company.wizards.com/content/jobs
More generally every website using frames.
It took me some time to pinpoint how to get my frames.

Steps to Reproduce

  1. Visit a website with such a frame
  2. Allow the frame
  3. Refresh; frame is still replaced by placeholder
  4. Hard refresh (ctrl + shift + r) once, sometimes more to finally see your frame appear.

Ruleset

None, I just a new profile for the issue with a fresh uMatrix.

Supporting evidence

Bring the screenshot interface close the umatrix panel, so I can't really show panel and place-holder side-by-side to prove anything.

Your environment

  • uMatrix version: 1.4.0
  • Browser Name and version: Firefox 69.0.2
  • Operating System and version: ArchLinux. No version (rolling release)
@gorhill
Copy link
Member

gorhill commented Oct 9, 2019

This is a documented behavior: About "the page is still broken after I created all necessary rules".

@uBlock-user uBlock-user added invalid Not a valid issue site breakage site breakage labels Oct 9, 2019
@Porkepix
Copy link
Author

Porkepix commented Oct 9, 2019

This is a documented behavior: About "the page is still broken after I created all necessary rules".

@gorhill My bad for missing it then.
However, the meaning of the page, as well as talking about "documented behavior" is a bit unclear to me. Does it mean this is something that can't be fixed?

@gorhill
Copy link
Member

gorhill commented Oct 9, 2019

I consider it's best to let the user decides when to bypass the cache, not have uBO do it automatically every time a rule changes.

@Porkepix
Copy link
Author

Porkepix commented Oct 9, 2019

Makes sense if this is the only way to fix it.
Thanks for the answer!

@uBlock-user
Copy link
Contributor

uBlock-user commented Oct 9, 2019

It's not something you can fix, browser controls when to pull from the cache or make an actual network request. By doing hard reload, you're signaling the browser to bypass the cache. It's a browser behaviour.

@gorhill
Copy link
Member

gorhill commented Oct 9, 2019

This could be fixed with webRequest.handlerBehaviorChanged.

But I have always considered that having uBO invalidates all caches to be more inconvenient than just having the user choose when to bypass the cache for a specific page.

Specifically, the Chrome documentation says "This function call is expensive. Don't call it often."

However, I now realize the Firefox behavior seems more friendly as per documentation, as it appears this affects only the memory-based cache, which is typically short-lived. Given this I will experiment maybe using it for Firefox only.

@gorhill gorhill reopened this Oct 9, 2019
@uBlock-user uBlock-user added something to address something to address enhancement New feature or request and removed invalid Not a valid issue site breakage site breakage something to address something to address labels Oct 9, 2019
@bbugh
Copy link

bbugh commented Nov 23, 2019

Hi! 👋 I came here to report this as well. I looked at the docs but passed over the linked page about the issue. As a user, it seems like the page loaded fine, but uMatrix didn't, so I wouldn't think to check it.

Perhaps putting some text in the framePlaceholderDocument that mentions that it may require a hard cache reset would be another helpful UX change?

PS Thanks for uMatrix, I can't use the internet without it.

@Strilanc
Copy link

Strilanc commented Jan 26, 2020

I also ran into this issue on the site https://algassert.com/quirk which is a quantum circuit simulator with the javascript embedded into the HTML file. The blocked javascript got cached, so unblocking and even disabling umatrix and all other addons entirely had no effect. I had to manually clear my browser cache.

@gwarser
Copy link

gwarser commented Aug 1, 2020

There may be some edge cases where after disabling and then enabling filtering, scripts may still be executed: https://www.reddit.com/r/uMatrix/comments/hj36mb/weird_bugleak_with_cache/

@gwarser
Copy link

gwarser commented Aug 1, 2020

u/KeinZantezuken in above thread proposed to add handlerBehaviorChanged() to already existing Shift + click on reload button in popup (?).

@gorhill
Copy link
Member

gorhill commented Aug 1, 2020

Did he try it? I don't see why the browser would not bypass the short-term cache when it is asked to bypass cache.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants