Render document before external scripts are downloaded



15 years ago
14 years ago


(Reporter: alexey, Unassigned)



Windows Server 2003

Firefox Tracking Flags

(Not tracked)




15 years ago
Mozilla should not wait for external <script> downloads to time out before
rendering the page.

If a page uses external script in it's <head>, Mozilla will not render the page
until the script download attempt times out.
If the URL of the script resolves to 12 IPs and all 12 do not respond, good 10
minutes can pass before the page is actually displayed. This of course depends
on connection timeout setting, which may be set to 15 minutes in the operating
system, then it would take hours for page to render.
If more than one script is linked in the <head>, the page display waiting time
Hitting stop, doesn't render the page.
If a site includes scripts on every page, browsing such site becomes beyond
painful, bordering impossible.

I have firewalled off AOL ad servers to get rid of ads in my ICQ (using ZoneAlarm).
However every page on in it's <head> includes at least 2 <script> links
which is resolved as:   IN CNAME   IN A
                   IN A
                   IN A
                   IN A
                   IN A
                   IN A
                   IN A
                   IN A
                   IN A
                   IN A
                   IN A
                   IN A

Now to display any CNN article/page I have to wait 10-15 minutes (thank God not
hours) while Mozilla tries to contact every single one of those IP addresses
time after time, once for every single linked script.

This is really painfull, and ironically turns Mozilla into Adware - I have to
watch AOL ads if I want to browse CNN with Mozilla. ;o)

Desired behaviour:
Render already downloaded page without waiting for script downloads.

I don't know if this is technically feasible, as I understand the scripts may
have write() functions in them. But this is very, very, VERY desirable.

I am well aware of 2 workarounds:
1. Live with ads.
2. Poison the ad URL DNS in local hosts file.

But if this change in Mozilla can be done, it will be heaven. And it will
noticeably improve performance in general.

Other solutions that could greatly improve the situation:

Render already downloaded page without javascript if Stop button is pressed.

If multiple links are to the same unreachable server, Mozilla shouldn't attempt
to contact the server multiple times for every link. One failed connection is
enough for all URLs to this server. Though I guess this point may be arguable,
but would make a lot of difference in this case.

Or at least if a host resolves to multiple IPs, and have multiple URLs to fetch
from it, don't wait for each IP to time out, and try to connect to different IPs
in parallel.

Darin, do network.http.max-*connections-per-server prefs work per hostname or
per resolved IP?

Related bugs:
bug 153118
bug 193967
bug 196263
I see no way to implement document.write() and yet allow rendering to proceed
while waiting on a script.  For example, the script can write out an opening of
a comment and then content following it will be commented out...

So this bug, as filed, is wontfix.  Please feel free to file separate bugs on
the other suggestions.
Last Resolved: 15 years ago
Resolution: --- → WONTFIX
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.