Re: php and javascript
| From: | Lars Torben Wilson | Date: | Sat, 16 Sep 2000 21:03:59 +0000 |
| Subject: | Re: php and javascript | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-17022@lists.php.net to get a copy of this message | ||
Robert Lorimor writes:
> Hi everyone,
>
> It is my understanding that javascript that is embedded into the html is
> client side, correct? It is my understanding that it is.
>
> Then, why does my javascripts rollover buttons on a PHP Server are slow,
> while the buttons rollovers on a NT server are quick.
>
> You can see the different by checking out these two sites.
>
> http://rlorimor.phenominet.com <-- php Server
> http://travelswithbob.com <-- NT Server (this site is
> still at
> travelswithbob.com for the time being while we wait for the domain
> transfer.)
>
> Robert Lorimor
> rlorimor@asiaroadexports.com
> Webmaster
I haven't really looked that closely, but every time a mouseover
happens on these sites, there is a server access--so that's probably
the reason right there. One of the sites just seems to respond or load
the images more quickly.
You are quite correct in that the Javascript is completely client-side
while the PHP is completely server-side. The fact that the Javascript
may have been generated by PHP (or ASP or CF or whatever) is
absolutely irrelevant by the time the mouseovers get a chance to
happen. Unless, of course, the mouseovers load images generated or
provided by a script on the server side, which doesn't appear to be
the case on your servers--and anyway, it's a contrived exception. :)
--
+----------------------------------------------------------------+
|Torben Wilson <torben@php.net> Netmill iTech|
|http://www.coastnet.com/~torben http://www.netmill.fi|
|Ph: 1 250 383-9735 torben@netmill.fi|
+----------------------------------------------------------------+