-
Notifications
You must be signed in to change notification settings - Fork 11
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
Not being able to guarantee interception #55
Comments
@ghostwords This is a major concern and I have tried several approaches to fix the problem. (working with cookies, local storage and other things). Many thanks for sharing the Workarounds and Upcoming APIs. I will read all the discussions, there is certainly some gold there that I can use to try some solution for this! |
@ghostwords I believe I have found a solution (reading all the discussions and references) to ensure the interception. I used the cookie idea with a fallback to onCommitted solution. I wrote some notes about my experience and the result: guides/how-it-works/interception.md I'll keep an eye on the Upcoming APIs. Thanks again for sharing all this, it helped a lot to improve the project! |
Nice, I agree that the cookie approach seems to be the only workaround that provides synchronous messaging. However, the cookie workaround comes with many downsides, some already documented in your guide. One that comes to mind is the uncertainty around multiple frames (pes10k/web-api-manager#14 (comment)), another is it breaking in cookie-restricted environments (pes10k/web-api-manager#53). I'm going to spend a little more time reviewing the options as part of EFForg/privacybadger#1861. Current feeling is to keep complexity low and accept the injection delay, and later switch to using |
@ghostwords An update on this subject, I created a page with random iframes and random load times to better visualize the interceptions and I got some curious results: https://gbaptista.github.io/luminous/html/demos/interception/ I just open the page and try to block the execution of
I understand this approach, it makes sense. In the case of Luminous we end up losing too many blocks with this, it's complicated.
I will do some experiments with
Could I help in any way in this?
Definitely! Some screenshots of my experiments:
|
@ghostwords I tried both APIs (contentScripts.register and webRequest.filterResponseData). My impressions and results:
|
https://groups.google.com/a/chromium.org/ |
Another issue with |
@Atavic: Despite the interest, apparently no one is willing to work on this:
I have no idea how difficult that would be to implement this. I'll try to search for how it was done in Firefox... A good knowledge in C++ is certainly necessary, but what scared me was to see the requirements to build Chromium and try to implement something like this:
|
This is a problem with current WebExtensions APIs: we can either guarantee injection (into a frame) before anything else will happen, or we can inject conditionally/pass configuration to the injected script, but not both. There are workarounds and promising upcoming APIs, however.
Workarounds:
chrome.webNavigation.onCommitted
listener to spam frames with messages every ten milliseconds until the frame responds or message limit is hit. (I am reviewing this approach for Privacy Badger.)Upcoming APIs:
The text was updated successfully, but these errors were encountered: