From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Condition to link to javascript code? Date: Sat, 24 Dec 2016 13:55:18 -0500 Message-ID: References: <87eg19uc8y.fsf@gnu.org> <87pokpnn7b.fsf@bzg.fr> <87lgvc8hrp.fsf@bzg.fr> <878trb517w.fsf@bzg.fr> <87oa05h66j.fsf@gmx.us> <87y3z8feig.fsf@gmx.us> Reply-To: rms@gnu.org NNTP-Posting-Host: blaine.gmane.org Content-Type: text/plain; charset=Utf-8 X-Trace: blaine.gmane.org 1482605785 7867 195.159.176.226 (24 Dec 2016 18:56:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 24 Dec 2016 18:56:25 +0000 (UTC) Cc: emacs-devel@gnu.org To: Achim Gratz Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 24 19:56:20 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cKrUN-0000pG-NZ for ged-emacs-devel@m.gmane.org; Sat, 24 Dec 2016 19:56:15 +0100 Original-Received: from localhost ([::1]:44522 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKrUS-00037P-4h for ged-emacs-devel@m.gmane.org; Sat, 24 Dec 2016 13:56:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKrTj-00037J-Lo for emacs-devel@gnu.org; Sat, 24 Dec 2016 13:55:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cKrTi-0005Nq-RC for emacs-devel@gnu.org; Sat, 24 Dec 2016 13:55:35 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51441) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKrTS-0005Ek-Vg; Sat, 24 Dec 2016 13:55:19 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1cKrTS-0001x7-8t; Sat, 24 Dec 2016 13:55:18 -0500 In-reply-to: (message from Achim Gratz on Sat, 24 Dec 2016 12:41:47 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:210790 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > You have to rewrite the DOM the browser sees before rendering the page > (or at least before it renders the part that loads klipse.js). "Rewrite" normally means making big changes, but I think you're using it to mean "alter". Indeed, my proposal would include altering the DOM. > The original page would always need to be > loaded at least partly, then check for the availability of local script > files, decide on where to load them from, then render the modified page. That makes sense. > In order to be responsive, those decisions need to be made as early as > possible, so it'd be a mistake to render much of the page before getting > there. That makes sense. You'd also have to ensure that the browser doesn't prefetch the > server versions (i.e. because they are visible in the document before > you get to remove them from the final DOM). There is no reason for the initial HTML to refer to klipse.js at all. Since that is a Javascript program, there is no point fetching it at all unless Javascript is enabled. If the URL for loading it is filled in by execution of other previous JS code, there is no chance of prefetching klipse.js from anywhere. So, is there any flaw in this plan? -- Dr Richard Stallman President, Free Software Foundation (gnu.org, fsf.org) Internet Hall-of-Famer (internethalloffame.org) Skype: No way! See stallman.org/skype.html.