Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #22839
| Message-ID | <231821878.aeL59MFQ59@PointedEars.de> (permalink) |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Organization | PointedEars Software (PES) |
| Date | 2014-01-28 11:33 +0100 |
| Subject | Re: Shutting script down when leaving page |
| Newsgroups | comp.lang.javascript |
| References | (2 earlier) <6507961.N3xZG9CObR@PointedEars.de> <270120141041247876%timstreater@greenbee.net> <lc6cta$n8c$1@reader1.panix.com> <10703674.pIetZOEVdU@PointedEars.de> <lc7dnh$n8c$3@reader1.panix.com> |
Xox wrote: > On Tue, 28 Jan 2014 01:20:22 +0100, Thomas 'PointedEars' Lahn wrote: >> Xox wrote: >> ^^^ >> Please fix this. > > What would you prefer? Your real name, of course. You may insert your nickname as well, though. See my From header field value for an example. >>> I will explain in another way. I have a page which has some >> >> You do not have a page, you have a document. > > Well, actually, I wrote a 'page' of code, Actually, you did not. You wrote a file that contained, or maybe a program that generated, a document. There is no page unless you print it out. But the advantage of HTML, and the Web in general, is that presentation of content depends on the medium of presentation. > which implies a document, Hypertext resources on the Web, especially HTML resources, are called documents. <http://www.w3.org/TR/html4> <http://www.w3.org/TR/html5> This use originates from the beginnings of the World Wide Web, at CERN: <http://www.w3.org/History/1989/proposal.html> > but when I wrote it, it was a page, that is, an HTML file, You are using terminology that is not well-defined. Such leads to confusion and is to be avoided. > which happened to include scripts. That gets turned into a document when- > it is read and interpreted, No, before. > but it was not a document in the sense I think we are using this word when > I wrote it. See above. >>> Javascript functions on/in it. >> >> There is no “Javascript”, but, for the sake of discussion, let us >> continue under the assumption that you wrote “JavaScript”, even though >> even that term is insufficient to describe the situation. > > Out of curiosity, I wonder what you would prefer. > I thought I was writing Javascript, I used grammar > widely attributed to Javascript, and hence I > wrote my question in a newsgroup called, of all > things, comp.lang.javascript, where we are having > this discussion, so you can see how I might have > gotten that impression. First of all, you are using wrong spelling, in particular wrong character case. Second, “JavaScript” is only the name of one ECMAScript implementation used in browsers; one of many. Read the ECMAScript Support Matrix for details. I would prefer “functions written in/for an ECMAScript implementation” of course, but I can see that this may not be practical. Thus, since we are already discussing in comp.lang.javascript, we can make use of the context, drop the superfluous attributes altogether, and just say “functions”. The dedicated reader will then be able to infer from the context that what we meant were entities that are described exactly using the words in the first sentence of this paragraph. >>> I would think not, >> >> Why? > > I may be showing my age, but back in the day, if you > didn't need a resource, you got rid of it -- you freed > memory, and stopped processes/threads/tasks/transactions > that were no longer useful (in this case, to affect what > the user sees/hears etc.) Conceded, you might keep the > material around if you thought it could be revisited in > the near future. But indefinite retention of the resources > seems likely to bog down the supporting platform. > > But maybe nobody cares any more. I read somewhere that > Firefox kept allocated memory around indefinitely until > the process(es) terminated. Like all day or all week, if > the user didn't quit. You are still proceeding from the false, but common, assumption that window and document were the same entity, or even represented by the same object. (In part, the original design of JavaScript[tm] is to blame for that.) Instead, it is quite possible that code executed by window.setTimeout() or window.setInterval() does not have anything to do with the document resource that is displayed in one of the window's views (which is represented by the “document” property). So what logical reason could there be not to continue executing it when that document resource is being navigated away from, unless the author of the document explicitly said so? > It looks like you have given the answer I was looking > for, although it's not what I wanted to hear. So it > goes. A polite person would have said “thank you” at this point anyway. And trimmed their quotes before. <http://PointedEars.de/faq#posting> pp. -- PointedEars Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Shutting script down when leaving page Xox <etacx18@etaoin.com> - 2014-01-27 03:25 +0000
Re: Shutting script down when leaving page Andrew Poulos <ap_prog@hotmail.com> - 2014-01-27 18:08 +1100
Re: Shutting script down when leaving page "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-01-27 10:23 +0100
Re: Shutting script down when leaving page Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-01-27 11:21 +0100
Re: Shutting script down when leaving page Tim Streater <timstreater@greenbee.net> - 2014-01-27 10:41 +0000
Re: Shutting script down when leaving page Xox <etacx18@etaoin.com> - 2014-01-27 19:43 +0000
Re: Shutting script down when leaving page "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-01-27 20:53 +0100
Re: Shutting script down when leaving page Xox <etacx18@etaoin.com> - 2014-01-27 20:52 +0000
Re: Shutting script down when leaving page Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-01-28 01:20 +0100
Re: Shutting script down when leaving page Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-01-28 01:24 +0100
Re: Shutting script down when leaving page "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-01-27 18:44 -0800
Re: Shutting script down when leaving page Xox <etacx18@etaoin.com> - 2014-01-28 05:03 +0000
Re: Shutting script down when leaving page Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-01-28 11:33 +0100
Re: Shutting script down when leaving page Xox <etacx18@etaoin.com> - 2014-01-28 19:40 +0000
Re: Shutting script down when leaving page "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-01-28 09:31 +0100
Re: Shutting script down when leaving page Christoph Michael Becker <cmbecker69@arcor.de> - 2014-01-27 21:37 +0100
Re: Shutting script down when leaving page Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-01-28 00:10 +0100
Re: Shutting script down when leaving page Christoph Michael Becker <cmbecker69@arcor.de> - 2014-01-28 00:54 +0100
csiph-web