Re: IP addresses and JS.
- From: "Richard Cornford" <Richard@xxxxxxxxxxxxxxxxxxx>
- Date: Sun, 11 Sep 2005 16:54:43 +0100
Me wrote:
> Evertjan. wrote:
<snip>
>>A computer language is just that, a language and can do
>>nothing. It is only the running of the executing/
>>interpreting/rendering programme on a computer that "does"
>>something. That's why it is so important to know "where"
>>the javascript is executed.
>>
> But if a home user connects to a website that uses JS,
> would not that JS execute on the client (home user's)
> machine when the user downloads the webpage?
<snip>
Stating that a web site "uses JS" is too vague to say anything useful.
Javascript is just a programming language, and may be used to script all
sorts of host environments including servers. It just happens to be the
scripting language of choice for web browser implementers.
The interaction between a web browser and a server is through HTTP. HTTP
is a request-response protocol. The browser client sends an HTTP request
to a server (possibly through proxies). The server receives a request,
makes decisions about how to react to the request and then sends a
response back to the client. The client then does something with the
response.
In making a decision about how to react to a request a server may
execute scripts and/or programs, and those scripts/programs may be
written in JS, C/C++, Perl, Java, PHP, any .NET language and much else
besides. If the server happens to execute scirpts written in JS in
deciding how to react to the HTTP request then the site may be described
as 'using JS', and that JS code is executed on the server (only).
The HTTP response sent back to the client may be an (x)HTML page that
includes SCRIPT elements that contain (or reference) javascript source
code. A site sending javascript in its responses may also be said to be
'using JS'. If that is the case, and the client is a web browser capable
of executing JS, has its security settings such that it may execute the
script, supports the features employed by the script, and the script
source code is correct and error-free, then the browser may execute that
script on the client's computer.
A script executing on the server has access to all of the information
contained in the HTTP request (and any other resources available on the
server or to which the server has been granted access, such as
databases). A script executing on the browser has access to whatever the
browser exposes to it, which would normally include little more than the
browsers internal representation of the document that it was showing,
and would not normally include the hard discs of the local computer, the
local computer's IP address, the local network and anything else that
may have security implications.
Richard.
.
- Follow-Ups:
- Re: IP addresses and JS.
- From: Boobie
- Re: IP addresses and JS.
- References:
- IP addresses and JS.
- From: Me
- Re: IP addresses and JS.
- From: Mick White
- Re: IP addresses and JS.
- From: Me
- Re: IP addresses and JS.
- From: Boobie
- Re: IP addresses and JS.
- From: Evertjan.
- Re: IP addresses and JS.
- From: Me
- IP addresses and JS.
- Prev by Date: display number of characters in textarea box
- Next by Date: Re: Remove a Node/element
- Previous by thread: Re: IP addresses and JS.
- Next by thread: Re: IP addresses and JS.
- Index(es):
Relevant Pages
|