
Loading…
document-blocked doesn't appear in Chrome Incognito mode #1225
Related: https://developer.chrome.com/extensions/manifest/incognito:
Because incognito tabs cannot use this shared process, an extension using the "spanning" incognito mode will not be able to load pages from its extension package into the main frame of an incognito tab.
Trying split mode did fix the specific issue here, but there were side-effects, which I am not sure whether they are ok or not.
The split mode causes two uBlocks to run at the same time, one for non-incognito tabs and one for incognito tabs. This means that all in-memory data won't be synchronized between the two uBlock, until it is reloaded in memory. An example: if I disable strict-blocking for a site in incognito mode, it will still be blocked in in non-incognito mode until uBlock is restarted for that context. Same with dynamic rules, etc. I think these side effects are more acceptable than strict blocking being broken in incognito mode.
uMatrix uses a data URI, which doesn't suffer the restriction of spanning mode, but that page in uMatrix has no javascript, unlike the one here. I suppose the javascript file could be converted into a data URI, and the extension page itself converted into a data URI...
data: URI doesn't work, because of the javascript. Only solution is to use split in manifest.
data:URI doesn't work
Hmm? I did a quick test and it seems to work as expected:
data:text/html;base64,PGh0bWw+PGhlYWQ+PC9oZWFkPjxib2R5PjxoMT5DbGljayB0byBhZGQgdGV4dDwvaDE+PHNjcmlwdD5kb2N1bWVudC5ib2R5Lm9uY2xpY2s9ZnVuY3Rpb24oKXt2YXIgaDE9ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnaDEnKTtoMS50ZXh0Q29udGVudD0nVGhpcyBpcyBzb21lIG1vcmUgdGV4dCc7dGhpcy5hcHBlbmRDaGlsZChoMSk7fTwvc2NyaXB0PjwvYm9keT48L2h0bWw+
Problem is the loading of secondary resources: vapi-client.js, etc.
@gorhill sure — wouldn't a set of simple matches of <script src="(whatever)"></script> and XHR solve that issue, though?
That seems better in comparison to having two instances of uBlock running in the same browser (which just feels like inviting trouble).
Document blocking is removed in 0.9.3.5. It was troublesome and provided little value compared to the frustration it caused.
In a Chrome Incognito window (with Chrome configured to run uBlock in Incognito), the document-blocked page doesn't appear when the user tries to visit a blocked URL. Instead, they receive a Chrome error page with ERR_ADDRESS_UNREACHABLE.
This is observed in 41.0.2272.118 with uBlock 0.9.3.0.