Render document before external scripts are downloaded

RESOLVED WONTFIX

Status

SeaMonkey
General
RESOLVED WONTFIX
14 years ago
14 years ago

People

(Reporter: Alexey Chernyak, Unassigned)

Tracking

({perf})

Trunk
x86
Windows Server 2003

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

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

Problem:
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
multiplies.
Hitting stop, doesn't render the page.
If a site includes scripts on every page, browsing such site becomes beyond
painful, bordering impossible.

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

ar.atwola.com.   IN CNAME   ads.web.aol.com.
ads.web.aol.com.   IN A   205.188.165.185
                   IN A   205.188.165.249
                   IN A   64.12.174.57
                   IN A   64.12.174.121
                   IN A   64.12.174.185
                   IN A   64.12.174.249
                   IN A   152.163.208.57
                   IN A   152.163.208.121
                   IN A   152.163.208.185
                   IN A   152.163.208.249
                   IN A   205.188.165.57
                   IN A   205.188.165.121

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.
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → WONTFIX
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.