Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: Which type of network access for this situation? Supersedes: <1977316.oW6HYlhP0t@PointedEars.de> Date: Tue, 18 Apr 2017 05:40:05 +0200 Organization: PointedEars Software (PES) Lines: 43 Message-ID: <1548999.FzFueAZbcE@PointedEars.de> References: <7e444aec-2938-4da7-9162-54b71bbe7be7@googlegroups.com> <1611458.0Y0JHutS3l@PointedEars.de> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: solani.org 1492486804 32504 eJwNyMkBwDAIA7CVCuEcpwV7/xFSPeUnJCYtPMzpVDmE5mhLqwFB2T+tBA8+YLPYMLxROdu8HBkRqg== (18 Apr 2017 03:40:04 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Tue, 18 Apr 2017 03:40:04 +0000 (UTC) User-Agent: KNode/4.14.2 X-NNTP-Posting-Host: eJwFwYEBwCAIA7CXUGjtzoEh/59gAufif4JgYDA3IhruPLXlPYmVsrrKa1Ntgj4ndwxAqh4WqRCv X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. Thomas 'PointedEars' Lahn wrote: >> Stefan Weiss wrote: >>> Use the XMLHttpRequest object. […] >> >> Not necessarily. If a resource is to be downloaded to be saved as a file >> in the filesystem in a user-specified location after a “timer goes off”, >> then a simple >> >> var timer = window.setTimeout(function () { >> window.clearTimeout(timer); >> >> window.location = "…"; >> }, 42); >> >> suffices [...] > > You don't even need JavaScript for that. This is basically the same as > , No, it is not. My example should not be misconstrued as standalone. Different to that markup feature, you can call window.setTimeout() *at any time* in the program. Most importantly, you can call it *following a specific user action*. > with all the navigation problems that come with it. I am aware of that markup feature, and the problems with it (including navigation problems) are why I did not mention it. > The OP also wrote "download some stuff [...] _and_display_it_", which I > understood to mean "fetch with JS and insert into the current document". > If this interpretation is correct, neither `window.location = ..` nor a > meta refresh will do what he needs. If. You are jumping to conclusions there, too. -- PointedEars FAQ: | | Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.