Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!panix!not-for-mail From: Xox Newsgroups: comp.lang.javascript Subject: Re: Shutting script down when leaving page Date: Mon, 27 Jan 2014 20:52:41 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 43 Message-ID: References: <6507961.N3xZG9CObR@PointedEars.de> <270120141041247876%timstreater@greenbee.net> NNTP-Posting-Host: pool-74-108-80-123.nycmny.east.verizon.net Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: reader1.panix.com 1390855961 23820 74.108.80.123 (27 Jan 2014 20:52:41 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Mon, 27 Jan 2014 20:52:41 +0000 (UTC) User-Agent: Pan/0.136 (I'm far too busy being delicious; GIT 926a150 git://git.gnome.org/pan2) Xref: csiph.com comp.lang.javascript:22828 On Mon, 27 Jan 2014 20:53:02 +0100, Evertjan. wrote: > Xox wrote on 27 jan 2014 in comp.lang.javascript: > >> Now suppose the browser navigates to another page. I am wondering >> whether some browsers may continue to execute the aforesaid function >> invocations anyway. I would think not, but stranger things have been >> coded. >> >> I could make a list of the ids returned by setInterval and run >> clearInterval against each on the onunload event, >> but I'd just as soon not bother if it's superfluous. > > What nonsense. > > Why do you bother us, > if you do don't bother if it's superfluous? > > You could defend homeopathy with the same words. > > 1 There is no evidence that does. > > 2 There is no logical reason why it should. > > 3 It could be easily tested if you wanted to do that, > as you are afraid of cpu consumption. Well you can measure that. Yes, I can. However, I don't run instances of all contemporary browsers, and I thought someone might know offhand because they knew more about how browsers are constructed than I do. It is clear there are lots of extremely knowledgeable people participating in this newsgroup, to say nothing of their incisive wit. I love the smell of napalm in the morning, too. The fact that something is reasonable and logical is no guarantee that people have done things that way. My very humble advice is not to make this assumption in any kind of computer programming, systems design, or engineering, at least not if they can come after you when your stuff doesn't work.