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

High-light domains containing cdn in domain list #770

Closed
5 of 8 tasks
gitressa opened this issue Nov 2, 2019 · 12 comments
Closed
5 of 8 tasks

High-light domains containing cdn in domain list #770

gitressa opened this issue Nov 2, 2019 · 12 comments
Labels
declined declined enhancement New feature or request

Comments

@gitressa
Copy link

gitressa commented Nov 2, 2019

Prerequisites

  • I verified that this is not a filter issue
  • This is not a support issue or a question
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue
    • Your issue may already be reported.
  • I tried to reproduce the issue when...
    • uBlock Origin is the only extension
    • uBlock Origin with default lists/settings
    • using a new, unmodified browser profile
  • I am running the latest version of uBlock Origin
  • I checked the documentation to understand that the issue I report is not a normal behavior

Description

Many web sites use a CDN, which is often needed to make the page render correctly. For example https://knowyourmeme.com/ which has a long list of third-party scripts:

  • amazon-adsystem.com
  • b2c.com
  • chartbeat.com
  • clarium.global.ssl.fastly.net
  • complex.com
  • connatix.com
  • consensu.org
  • facebook.net
  • google-analytics.com
  • google.com
  • gstatic.com
  • hotjar.com
  • kym-cdn.com
  • msecnd.net
  • newrelic.com
  • ntv.io
  • pinterest.com
  • quantserve.com
  • scorecardresearch.com
  • shopifycdn.com
  • twitter.com
  • videoplayerhub.com
  • zergnet.com

From the list, it is only necessary to unblock kym-cdn.com to make the page work.

It would be a great feature if the domains in the list which contains the string cdn stand out, maybe by making them bold?

A specific URL where the issue occurs

https://knowyourmeme.com/

Steps to Reproduce

  1. Go to https://knowyourmeme.com/
  2. See that it doesn't look great
  3. Unblock kym-cdn.com to make it look better

Your environment

  • uBlock Origin version: 1.23.0
  • Browser Name and version: Firefox 70.0
  • Operating System and version: Ubuntu 18.04
@uBlock-user uBlock-user added the something to address something to address label Nov 2, 2019
@uBlock-user
Copy link
Contributor

unblock kym-cdn.com to make the page work.

It's not blocked in the first place by any filterlist, are you blocking it yourself ?

@gitressa
Copy link
Author

gitressa commented Nov 3, 2019

swiftype.com is another example, where allowing their cdn domain swiftypecdn.com does the trick.

@gitressa
Copy link
Author

gitressa commented Nov 3, 2019

Thanks for getting back about this. I should of course have mentioned it, but I have these under "My Rules" > "Permanent rules":

* * 3p block
* * 3p-frame block
* * 3p-script block

So in my list of domains above ("... which has a long list of third-party scripts") everything is blocked, except knowyourmeme.com.

But I really do want to block third-party scripts and choose myself which to allow ...

@gitressa
Copy link
Author

gitressa commented Nov 3, 2019

Something odd is happening with Github ... My two previous comments are in reverse order. Also, I got an e-mail alert that someone posted this in #770 (comment) ... A comment which is nowhere to be seen:

FYI -- You have * * 3p block which makes the other two rules redundant.

@uBlock-user
Copy link
Contributor

FYI -- You have * * 3p block which makes the other two rules redundant.

I posted that, but for some reason, it doesn't appear. GitHub issue.

@gitressa
Copy link
Author

gitressa commented Nov 3, 2019

Thanks, I think Github might have had some challenges at the time ...

But I use hard mode, and this is what the excellent documentation tells me to add:

My rules pane:

  • Add * * 3p block
  • Add * * 3p-script block
  • Add * * 3p-frame block

Or is the documentation wrong?

@gorhill
Copy link
Member

gorhill commented Nov 3, 2019

Or is the documentation wrong?

No, it's good. The point of also having 3p-script block and 3p-frame block is to easily downgrade to a lesser blocking mode -- which is even easier now with the "Relax blocking mode" shortcut.

@gitressa
Copy link
Author

gitressa commented Nov 3, 2019

Thanks for explaining the thoughts behind, and for working on uBlock Origin.

"Relax blocking mode" is an interesting concept. Is it documented how it works yet? From what I can tell, the first time the shortcut is pressed, it disables
* * 3p block

Second time shortcut is pressed disables

* * 3p-script block
* * 3p-frame block

Site likes adform.net ares still blocked, probably because they are on a Filter list, whereas consensu.org is now unblocked (third-party script, not on a Filter list).

Anyway, we are getting side tracked, this issue is about cdn's. Thinking about it, would a shortcut which enables domains with cdn in them make sense?

@gorhill
Copy link
Member

gorhill commented Nov 3, 2019

Thinking about it, would a shortcut which enables domains with cdn in them make sense?

I've had thoughts about implementing a heuristic to guess-noop some domains before downgrading to 3p-script/3p-frame -- your issue here relate to this.

Such heuristic extends beyond cdn occurrences however. For instance uBO should also report that arstechnica.net is likely related to arstechnica.com. Another idea which I saw in a script blocker a long long time ago (mentioned somewhere on Wilders Security when I was working on HTTP Switchboard) is a sort of Levenstein distance to guess related 3rd-party domains. Another variable that I have noticed is often correlated is the number of network requests, often 3rd-party domains used as CDN have a high count of blocked requests (images, css, scripts, etc).

So mainly the way I read your issue is not to literally deal with cdn in a specific way, but more generically to come up with a heuristic to single out 3rd-party domains which are seen as highly likely to be needed on the current site. The heuristic could be used to visually filter out unrelated domains so that it becomes easier for the user to focus and assess what is left, or to actively noop what is being assessed as being needed.

@gitressa
Copy link
Author

gitressa commented Nov 3, 2019

I understand, trying to guess relevant domains can get complicated very fast.

So mainly the way I read your issue is not to literally deal with cdn in a specific way, but more generically to come up with a heuristic to single out 3rd-party domains which are seen as highly likely to be needed on the current site. The heuristic could be used to visually filter out unrelated domains so that it becomes easier for the user to focus and assess what is left, or to actively noop what is being assessed as being needed.

That's exactly what I ask for, since it is not unusual for a web site to have +25 third-party scripts yet only one unblocked cdn will make most elements render fine. How to single these domains out in a user friendly way is another question ... perhaps changing the background color to a slightly darker/lighter nuance might do it?

As a start it could be something as simple as check for the presence of a string like cdn in the domain.

Another thing, and I don't want to side track the issue, but is it possible to make the uBlock window taller, to be able to see all scripts without having to scroll?
EDIT: I created #785

@ahydronous

This comment has been minimized.

@uBlock-user uBlock-user added enhancement New feature or request and removed something to address something to address labels Dec 17, 2019
@Shoggomo

This comment has been minimized.

@uBlockOrigin uBlockOrigin locked and limited conversation to collaborators Apr 29, 2020
@gorhill gorhill added the declined declined label Apr 15, 2024
@gorhill gorhill closed this as completed Apr 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
declined declined enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants