Skip to content
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

RFE: When ☑Block media elements larger than = 0kB, no requests should be made to media elements #1473

Closed
ethus3h opened this issue Mar 14, 2016 · 11 comments
Labels

Comments

@ethus3h
Copy link

ethus3h commented Mar 14, 2016

Read first: https://github.com/gorhill/uBlock/blob/master/CONTRIBUTING.md

Describe the issue

It says in the wiki page regarding the "No large media elements" option: "Note that this feature has no privacy value: a connection to the remote server must be performed in order to fetch the size of the resource."

When the setting is set to "Block large media elements larger than 0 kB", there should be no need to issue that request;

One or more specific URLs where the issue occurs

[URL(s) for issue on a specific site are mandatory]

Screenshot in which the issue can be seen

[Screenshot(s) for visual issues are mandatory]

Steps for anyone to reproduce the issue

  1. Be as detailed as possible:
  2. Because we are not looking over your shoulder and
  3. Keep in mind: Nobody can read your mind.

Your settings

[If you fail to provide this info, I will mark the issue as invalid. Lists all settings which differs from default settings]

  • Browser/version:
  • uBlock Origin version:
Your filter lists

[Example: "Default filter lists + FRA", or "Default filter lists minus uBlock -- Badware risks"]

Your custom filters (if any)
@ethus3h
Copy link
Author

ethus3h commented Mar 14, 2016

For some reason, the issue got saved before I finished writing. Here's the continuation:

…[there should be no need to issue that request;] I doubt that 0-byte media elements that are necessary for Web pages to work are fairly rare.

One or more specific URLs where the issue occurs

For example: Loading http://q13fox.com/2016/03/13/man-killed-toddler-rescued-after-car-hit-by-tree-in-seattle-park/ issues request to https://tribkcpq.files.wordpress.com/2015/12/pearl-harbor-8.jpg?w=370&h=204&crop=1 which is not loaded, even though there is no need to do anything with the information downloaded by that request.

Screenshot in which the issue can be seen

https://archive.org/download/Liquid-2016-03-14-12-13-47-N-2d303430300a-c5a90ee0-4738-4ce8-b784-544d726c5cae/Screen%20Shot%202016-03-14%20at%2012.13.21.35000.-0400.png

https://archive.org/download/Liquid-2016-03-14-12-13-47-N-2d303430300a-c5a90ee0-4738-4ce8-b784-544d726c5cae/Screen%20Shot%202016-03-14%20at%2012.13.22.65400.-0400.png

Steps for anyone to reproduce the issue

Using uBlock Origin v.1.6.4 in Firefox Developer Edition 47.0a2:

Your settings

https://archive.org/download/Liquid-2016-03-14-12-18-42-N-2d303430300a-3b5a6b9f-6da0-4328-b0b0-ac2f4ef93724/my-ublock-backup_3_14_2016%2c_12_18_16_PM.txt

  • Browser/version: Firefox Developer Edition 47.0a2
  • uBlock Origin version: 1.6.4

Your filter lists

See list in https://archive.org/download/Liquid-2016-03-14-12-18-42-N-2d303430300a-3b5a6b9f-6da0-4328-b0b0-ac2f4ef93724/my-ublock-backup_3_14_2016%2c_12_18_16_PM.txt

See list in https://archive.org/download/Liquid-2016-03-14-12-18-42-N-2d303430300a-3b5a6b9f-6da0-4328-b0b0-ac2f4ef93724/my-ublock-backup_3_14_2016%2c_12_18_16_PM.txt

@ethus3h
Copy link
Author

ethus3h commented Mar 14, 2016

It appears that I fucked up the Markdown syntax there, sorry for the ugly post....

@lewisje
Copy link

lewisje commented Mar 14, 2016

That sounds like a good special case: If the upper limit for media elements is 0 bytes, treat it as a request to block all media elements outright, without even making a request to inspect the headers.

@TPS
Copy link

TPS commented May 14, 2016

@ethus3h It'd be much more helpful if you made the title of this issue far more descriptive. I came here reading the title, thinking you didn't know about the Block media elements larger thankB option. Maybe modify to read something like "RFE: When Block media elements larger than0kB, no requests should be made to media elements"?

@ethus3h ethus3h changed the title No large media elements RFE: When ☑Block media elements larger than0kB, no requests should be made to media elements May 15, 2016
@ethus3h ethus3h changed the title RFE: When ☑Block media elements larger than0kB, no requests should be made to media elements RFE: When ☑Block media elements larger than = 0kB, no requests should be made to media elements May 15, 2016
@ethus3h
Copy link
Author

ethus3h commented May 15, 2016

Done :)

@gorhill
Copy link
Owner

gorhill commented Nov 8, 2016

After careful consideration, and a working prototype (as far as in a commit state), I prefer to decline this feature -- I reverted the code.

Blocking all images through a max size of zero is exceptional, but the code to handle that exceptional use affect too much the main code path: the fact that uBO caches internal result for efficiency complicate a bit too much for my taste the main code path internally.

As stated in the wiki, there is no privacy value to blocking media elements according to their size, so to not block at onBeforeRequest level is not an issue.

@gorhill gorhill closed this as completed Nov 8, 2016
@ethus3h
Copy link
Author

ethus3h commented Nov 8, 2016

Where can I find the code for it, so I can include it in my own copy? Thanks!

@gorhill
Copy link
Owner

gorhill commented Nov 8, 2016

It's lost, I scrapped the whole thing.

@ethus3h
Copy link
Author

ethus3h commented Nov 8, 2016

How can I prevent any requests to media elements until I click them, if not using that feature?

@gorhill
Copy link
Owner

gorhill commented Nov 8, 2016

You can't.

@ethus3h
Copy link
Author

ethus3h commented Nov 8, 2016

ugh, so I guess I've got to implement it myself... I… do not like javascript, lol. Thanks for letting me know the issue's closed so I can start in on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants