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

Some websites are displayed empty for ~5 seconds after loading finished #93

Closed
8 of 9 tasks
Photon89 opened this issue Dec 26, 2018 · 25 comments
Closed
8 of 9 tasks
Labels
invalid Not a valid issue site breakage site breakage

Comments

@Photon89
Copy link

Photon89 commented Dec 26, 2018

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 (latest stable version 1.3.14)
  • 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

Some websites are displayed empty for around 5 seconds after the throbber finished rotating, then the content is displayed. The rendering seems to be finished already since the scroll bar does not change any more when the website is actually displayed. The problem appears with a freshly created profile, uMatrix being the only extension installed. No changes to the filters are made. The problem appears only for some websites but does not for others.

A specific URL where the issue occurs

www.spiegel.de

Steps to Reproduce

  1. [First Step] Open www.spiegel.de
  2. [Second Step] ???
  3. [and so on...] Profit! (observe the browser behavior)

Ruleset

Default rules as they come with uMatrix 1.3.14 freshly installed.

Supporting evidence

Logger output attached: uMatrixLogger.tar.gz

Your environment

  • uMatrix version: 1.3.14
  • Browser Name and version: Firefox 64.0
  • Operating System and version: Arch Linux (rolling)
@uBlock-user
Copy link
Contributor

uBlock-user commented Dec 26, 2018

because it has a delay of 4000 ms defined with var spSPDelay=4000; Nothing to do with uMatrix.

@uBlock-user
Copy link
Contributor

It's inline either block the inline script with uMatrix or use uBlock Origin to disable that delay.

@uBlock-user uBlock-user added the invalid Not a valid issue label Dec 26, 2018
@Photon89
Copy link
Author

Thanks for the quick reply, guys!

I didn't look into the website's code, sorry for that. But my observation is that the issue does not appear when uMatrix is disabled. In this case, the website shows immediately after the throbber finished working (quite fast actually, much faster than 4 seconds, including the throbber loading time). How is this consistent with your explanation?

@uBlock-user
Copy link
Contributor

@mapx- Wasn't this patched few days ago in uBO ?

@uBlock-user
Copy link
Contributor

uBlock-user commented Dec 26, 2018

But my observation is that the issue does not appear when uMatrix is disabled. In this case, the website shows immediately after the throbber finished working (quite fast actually, much faster than 4 seconds, including the throbber loading time). How is this consistent with your explanation?

The javascript(to be specific that inline-script) is doing that. uMatrix only can block or allow network connections.

@Photon89
Copy link
Author

The javascript(to be specific that inline-script) is doing that. uMatrix only can block or allow network connections.

But I wonder why this JS is triggered with uMatrix and is not without it. Sorry, I'm not experienced in JS so I might overlook something...

@uBlock-user
Copy link
Contributor

It's not triggered, it's anti adblock script from SourcePoint. Anti adblock are best left to deal with uBlock Origin.

@gorhill
Copy link
Member

gorhill commented Dec 26, 2018

why this JS is triggered with uMatrix and is not without it

Because uBO redirects googletagmanager.com to a local neutered script -- the neutered script is what prevents the delay. uMatrix blocks googletagmanager.com and prevent uBO from doing the redirect.

@gorhill
Copy link
Member

gorhill commented Dec 26, 2018

@uBlock-user It's not an anti-blocker, it's gorhill/uBlock#2569, a by-design "optimization" delay from Google APIs.

@uBlock-user
Copy link
Contributor

uBlock-user commented Dec 26, 2018

It's from SourcePoint who runs the anti adblock scripts for the these domains, so presumed that must be the case.

Google's optimisation was async-hide's opacity set with a delay of 4 seconds, wasn't it ?

@uBlock-user
Copy link
Contributor

@gorhill https://developers.google.com/optimize/

Google uses async-hide, not like this.

@gorhill
Copy link
Member

gorhill commented Dec 26, 2018

Frankly I didn't investigate, I based my comments completely on a similar report on Reddit, https://www.reddit.com/r/uBlockOrigin/comments/a8tt1c/4_second_delay_on_spiegelde/ecdrwpz/.

@uBlock-user
Copy link
Contributor

uBlock-user commented Dec 26, 2018

There's no trace of google's snippet in the inline-script, that's what I first looked for when I saw this issue opened.

There was an issue recently opened in uBO too relating to Google's snippet's hiding annoyance -- uBlockOrigin/uBlock-issues#324

@gorhill
Copy link
Member

gorhill commented Dec 26, 2018

To put this to rest I just investigated and it is indeed googletagmanager.com. Simple test: uBO + default settings; block googletagmanager.com in uMatrix = delay; allow googletagmanager.com in uMatrix = no delay.

@Photon89
Copy link
Author

Thanks, I can confirm that this fixes the issue for me! Would it be a good idea to remove the googletagmanager filter rule from the default rules for websites which are known to cause such issues?

@gorhill
Copy link
Member

gorhill commented Dec 26, 2018

uMatrix is a "hard" blocker, it's not designed to make sites work out of the box, investigating and fixing such breakage is a normal part of using uMatrix.

@gorhill
Copy link
Member

gorhill commented Dec 26, 2018

Also, read https://github.com/gorhill/uMatrix/wiki/Preset-whitelisted-and-blacklisted-domains.

Specific whitelist rules are not, and will not be part of uMatrix.

@Photon89
Copy link
Author

I see, thanks for the explanation!

@uBlock-user
Copy link
Contributor

Even with uBO, the delay will remain as the redirect will not effectively get rid of the delay completely, but will make it slightly faster and given the race condition, scriptlets won't work on Chromium, so you will have to block the inline-script on Chrome/Chromium as a solution.

@Photon89
Copy link
Author

The latter problem is fine with me, I use Firefox anyway. :) Concerning the delay remaining, I'm not sure if I understand but after allowing googletagmanager in uMatrix it is not there or at least not bugging me any more.

@uBlock-user
Copy link
Contributor

uBlock-user commented Dec 27, 2018

I still face some delay on Chromium, behaviour must be different on Firefox then, fortunate for you if that's the case. Do you have uBlock Origin installed ?

@Photon89
Copy link
Author

Actually, I have uBlock Origin, uMatrix and NoScript installed on that machine. Originally it was just uBlock Origin and NoScript but then I needed to allow some elements selectively and added uMatrix which does the job greatly. Probably I need to remove NoScript since it's a PITA to configure both NoScript and uMatrix on every new site...

@uBlock-user
Copy link
Contributor

You don't need NoScript if you have already have uBO installed, it will only create further complications.

@Photon89
Copy link
Author

You mean, if I have uMatrix installed, right? Since uBO only blocks ads but doesn't block loading scripts from other domains etc.

@gwarser
Copy link
Member

gwarser commented Dec 28, 2018

@uBlock-user uBlock-user added the site breakage site breakage label Sep 18, 2019
@uBlockOrigin uBlockOrigin locked and limited conversation to collaborators Oct 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid Not a valid issue site breakage site breakage
Projects
None yet
Development

No branches or pull requests

4 participants