Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #22857
| Path | csiph.com!usenet.pasdenom.info!goblin1!goblin3!goblin.stu.neva.ru!panix!not-for-mail |
|---|---|
| From | Xox <etacx18@etaoin.com> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Shutting script down when leaving page |
| Date | Tue, 28 Jan 2014 19:40:32 +0000 (UTC) |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Lines | 138 |
| Message-ID | <lc913g$b0k$1@reader1.panix.com> (permalink) |
| References | <lc4jit$bmm$1@reader1.panix.com> <R5ydnabdDqqqm3vPnZ2dnUVZ_tqdnZ2d@westnet.com.au> <6507961.N3xZG9CObR@PointedEars.de> <270120141041247876%timstreater@greenbee.net> <lc6cta$n8c$1@reader1.panix.com> <10703674.pIetZOEVdU@PointedEars.de> <lc7dnh$n8c$3@reader1.panix.com> <231821878.aeL59MFQ59@PointedEars.de> |
| NNTP-Posting-Host | pool-74-108-90-248.nycmny.east.verizon.net |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| X-Trace | reader1.panix.com 1390938032 11284 74.108.90.248 (28 Jan 2014 19:40:32 GMT) |
| X-Complaints-To | abuse@panix.com |
| NNTP-Posting-Date | Tue, 28 Jan 2014 19:40:32 +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:22857 |
Show key headers only | View raw
On Tue, 28 Jan 2014 01:20:22 +0100, Thomas 'PointedEars' Lahn wrote:
>>> Xox wrote:
>>> ^^^
>>> Please fix this.
Xox:
>> What would you prefer?
On Tue, 28 Jan 2014 11:33:33 +0100, Thomas 'PointedEars' Lahn wrote:
> Your real name, of course. You may insert your nickname as well,
> though.
> See my From header field value for an example.
Any name is a 'real' name. You probably means something
like a legal, street, or business name.
Several years ago, I got tired of receiving death threats
and promises of lawsuits because of completely rational,
innocent items I had posted or referred to on Usenet and
elsewhere. It occurred to me then that some lunatic or
criminal could just look me up in the phone book and pay
a visit. Indeed, I actually had people come to my place
of business, although not to kill me but to try to sell
me something. Since then, I've used pseudonyms. However,
I'll keep your preference in mind should I revisit this
newsgroup in the future. It will be a special thing between
me and comp.lang.javascript, dependent, of course, on your
not issuing any death threats.
[ argument about terminology not worth pursuing ]
>>>> 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.
On a stylistic note, I find internal capitalization
rather twee when writing in natural language, but again,
I will defer to local usage.
In the matter of the names of scripts, at one time I
was much vexed by the variety of interpreters, versions,
DOMs, etc., with which I am sure you are familiar. For
all I know, this browser or that may include many
interpreters which behave differently from each other
even in the same browser, and of course from all the
others in different browsers, platforms, etc. etc. etc.
Saying 'JavaScript' approximated my particular area of
interest in this case, that is, what I get if I write
'<script type="text/javascript">' in an HTML file. If
that is really an ECMAScript interpreter, so be it.
[ on whether scripts could be expected to keep running ]
>> 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?
To me the contents of the window are a projection of the
document.
The fact that the document is being navigated away from,
so it is no longer 'active' in the metonymous sense in
which I used the word previously, should, I would think,
indicate to the browser that the function which was a part
of the document (according to your terminology, I think)
is no longer of interest. Practically speaking, a user
could navigate through dozens of pages with hundreds of
functions/routines/methods and thousands of objects,
which, if they were kept around indefinitely, would surely
impede the performance of the platform and the browser and
in addition might afford many opportunities for mischief
(stuff running out of sight). So, were I writing a
browser, I would stop anything where continued
execution was not explicitly requested, and I would tear
down the structures related to the document, maybe not
immediately, but pretty soon after it was no longer
'active' (again, my terminology). But I don't write
browsers, so what do I know?
>> 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.
People complain when I trim the quotes ('you have deleted
my precious text') and when I don't. But, anyway, you have
my undying gratitude.
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