page never finishes loading
page never finishes loading
Fx 3.6.0, NS 1.9.9.53, new profile, defaults
1) go to http://www.kinopoisk.ru/
2) temp allow kinopoisk.ru
3) page reloads and stays in the loading state
1) go to http://www.kinopoisk.ru/
2) temp allow kinopoisk.ru
3) page reloads and stays in the loading state
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
-
- Ambassador
- Posts: 1586
- Joined: Fri Mar 20, 2009 4:47 am
- Location: Colorado, USA
Re: page never finishes loading
It finishes loading for me if I also TA:
217.16.18.163
217.16.18.207
94.103.92.145
adriver.ru
217.16.18.163
217.16.18.207
94.103.92.145
adriver.ru
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
Re: page never finishes loading
If blocking a particular resource prevents a page from reaching loaded state, that's probably a bug, Giorgio?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
- Giorgio Maone
- Site Admin
- Posts: 9524
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: page never finishes loading
I'm investigating, but it's not necessarily a NoScript bug: the page may be checking whether a resource loads successfully in a certain timeframe and attempt a new load if it doesn't.al_9x wrote:If blocking a particular resource prevents a page from reaching loaded state, that's probably bug, Giorgio?
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
- Giorgio Maone
- Site Admin
- Posts: 9524
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: page never finishes loading
In fact, the same problem happen if you disable/uninstall NoScript and install ABP with Easylist.Giorgio Maone wrote:it's not necessarily a NoScript bug: the page may be checking whether a resource loads successfully in a certain timeframe and attempt a new load if it doesn't.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
Re: page never finishes loading
Ran into another site with this problem and decided to get to the bottom of this.
Here's a distillation:
Loading the above with NS results in perpetual loading state. This technique is utilized by http://www.adriver.ru/ and is in both sites.
Here's a distillation:
Code: Select all
<script>
var iframe_id = 'iframe1';
document.write('<iframe id="' + iframe_id + '"></iframe>');
(function()
{
var iframe, iframe_doc;
if ((iframe = document.getElementById(iframe_id)) && (iframe_doc = iframe.contentDocument))
iframe_doc.write('<script src="http://untrusted.invalid/"><\/script>');
else
setTimeout(arguments.callee, 100);
})();
</script>
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10
- Giorgio Maone
- Site Admin
- Posts: 9524
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: page never finishes loading
There's not much I can do about it, aside surrogating a "contentDocument"property on NoScript's placeholder (and contentWindow? and contentWindow.document? and what about contentDocument.write()?) .al_9x wrote: Loading the above with NS results in perpetual loading state. This technique is utilized by http://www.adriver.ru/ and is in both sites.
I'm not sure whether an iframe blocked by content policies has an accessible contentDocument either: does it work if you block the frame with ABP?
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10
Re: page never finishes loading
It's not clear from your response, can you repro this with the small test page from my previous post?Giorgio Maone wrote:There's not much I can do about it, aside surrogating a "contentDocument"property on NoScript's placeholder (and contentWindow? and contentWindow.document? and what about contentDocument.write()?) .al_9x wrote: Loading the above with NS results in perpetual loading state. This technique is utilized by http://www.adriver.ru/ and is in both sites.
I'm not sure whether an iframe blocked by content policies has an accessible contentDocument either: does it work if you block the frame with ABP?
If so, do you understand what specifically is causing the perpetual loading state? Please explain. The iframe is not being blocked AFAICT, there are no placeholders. The script is successfully written to the iframe (confirmed by venkman and dom inspector) and blocked by NS.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10
Re: page never finishes loading
I really don't understand what you're saying here. What placeholder? Anyway, I did identify the precise cause. In order for the the loading state to go to completion the document has to be closed. One of the doc.written external ad scripts does just that, but since it's blocked, the doc remains open.Giorgio Maone wrote:There's not much I can do about it, aside surrogating a "contentDocument"property on NoScript's placeholder (and contentWindow? and contentWindow.document? and what about contentDocument.write()?) .
It should be possible to fix this with a surrogate for the blocked script. It should probably test that it's in a doc.written frame before calling document.close() Is this the best approach?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10
- Giorgio Maone
- Site Admin
- Posts: 9524
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: page never finishes loading
Sorry, I was assuming you were blocking the frame and the perpetual loading was due to a setTimeout() loop.al_9x wrote:I really don't understand what you're saying here.
In your case, even though this is clearly a site bug and wouldn't deserve "fixing", a surrogate against the imported script will probably work.
You can try this:
noscript.surrogate.autoClose.sources
Code: Select all
untrusted.invalid
Code: Select all
if (top != self && top.location.href == location.href) setTimeout("try{document.close()}catch(e){}", 100)
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10
Re: page never finishes loading
Even if setTimeout were looping it would not keep the doc in the loading state.Giorgio Maone wrote:Sorry, I was assuming you were blocking the frame and the perpetual loading was due to a setTimeout() loop.al_9x wrote:I really don't understand what you're saying here.
How is it a site bug? It only manifests when NS blocks the ad script that closes the document.Giorgio Maone wrote:In your case, even though this is clearly a site bug and wouldn't deserve "fixing"
I'll make sure the surrogate is working for adriver.ru and post it, in case you decide to include it.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10
Re: page never finishes loading
Code: Select all
user_pref("noscript.surrogate.adriver.sources", "ad.adriver.ru/cgi-bin/erle.cgi");
user_pref("noscript.surrogate.adriver.replacement", "if (top !== self && top.location.href === location.href) setTimeout('try{document.close();}catch(e){}', 100);");
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10