NYCPHP Meetup

NYPHP.org

[nycphp-talk] Java Script

Scott Trudeau strudeau at umich.edu
Mon Feb 11 22:34:08 EST 2008


Urb,

Short answer: no.

Javascript loaded from a remote file has to available via a URL accessible
to any browser; since the browser downloads and runs the script itself.

It's often good practice to concatenate any external script files used
across most of your site and use a javascript "minify" or "pack" technique
to reduce the size of the javascript file so it is downloaded to the client
faster.  Some of these techniques can also be used to help obfuscate your
javascript code, but in general, you should expect any javascript to be
visible to any user agent that can access it.

As a total aside, there's been some interesting analysis recently into
optimal methods for delivering javascript, e.g.:

http://ejohn.org/blog/library-loading-speed/

... anyone have a sense if there's any interest out there for a NYC
Javascript meetup/SIG?

Scott

On Feb 11, 2008 9:50 PM, Urb LeJeune <urb at e-government.com> wrote:

>        My knowledge of Java Script is limited to taking someone else's
> script and making very minor changes. I would like to replicate PHP
> ability to have an include file located somewhere that is not in the
> normal web space.
>
>        My clients have a document root of:
>
> /home/domain-name/htdocs
>
>        I have php.ini configured to first look in the current directory
> and
> then /usr/local/include so that every client on the same server uses the
> same source code. Is the scheme doable using Jave Script?
>
>        Thanks
>
> Urb
>
> Dr. Urban A. LeJeune, President
> E-Government.com
> 609-294-0320  800-204-9545
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> E-Government.com lowers you costs while increasing your expectations.
>
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20080211/89b1caa4/attachment.html>


More information about the talk mailing list