From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out.smtp-auth.no-ip.com (smtp-auth.no-ip.com [8.23.224.60]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 7BECF77E69 for ; Fri, 6 Sep 2019 21:56:07 -0700 (PDT) X-No-IP: carhart.net@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from phoenix.carhart.net (unknown [99.57.137.251]) (Authenticated sender: carhart.net@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 254A6438 for ; Fri, 6 Sep 2019 21:56:07 -0700 (PDT) Received: from phoenix.carhart.net (carhart.net [127.0.0.1]) by phoenix.carhart.net (8.15.2/8.15.2) with ESMTP id x874u6PJ077432 for ; Fri, 6 Sep 2019 21:56:06 -0700 Received: from localhost (kevin@localhost) by phoenix.carhart.net (8.15.2/8.15.2/Submit) with ESMTP id x874u62P077429 for ; Fri, 6 Sep 2019 21:56:06 -0700 X-Authentication-Warning: phoenix.carhart.net: kevin owned process doing -bs Date: Fri, 6 Sep 2019 21:56:06 -0700 (PDT) From: Kevin Carhart X-X-Sender: kevin@phoenix To: Edbrowse-dev@lists.the-brannons.com Subject: [edbrowse-dev] timers and async (fwd) Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) X-BeenThere: edbrowse-dev@edbrowse.org List-Id: Edbrowse Development List MIME-Version: 1.0 Content-Type: text/plain; CHARSET=US-ASCII; format=flowed Content-ID: I think it's a good idea. > So it would be nice to *know* if async scripts can run after the page is > loaded, and after the onload code, but I don't even know how to ask the > question. Me too. And extraneous is a subjective matter, right? I don't think it would be discernible from static analysis. Although, what if you differentiated based on whether it addresses the domain that you are loading, or an outside domain? It wouldn't be 100% correct though, because sites can load libraries by just giving an href to the library website. So doubleclick.com would be discernible as external, but jquery.com would look external too. I also have a wacky idea. Since we don't know which scripts must run early, group them based on a random draw. Not by default, but as an enableable so it won't bother anyone unless they set it. So the user puts this setting on and the scripts are marked "must run early" or "can run later". Then the page loads based on that. From the user's perspective, they either got faster access to page contents, or they didn't. If they didn't, they are no worse off. If they did, they can find out what the draw happened to be, like 1,3,6, mandatory and 2,4,5 discretionary. And that grouping could become an ebrc setting for next time so that they can continue having early access to page contents. It would be a form of learning through working backwards. The thing that might make this work is that there tend to be a fairly small number of scripts most of the time. Thus ends my wacky ideas for now..