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 <[EMAIL PROTECTED]> 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 >
_______________________________________________ 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
