[Xitami] hiding *.js code
Ewen McNeill
xitami@lists.xitami.org
Sat, 18 Aug 2001 13:21:07 +1200
In message <002401c125b7$d2d7b780$9600000a@MINE1>, "Toernooi Assistent" writes:
>Would there be a way to hide *.js subroutines from simple browsing?
>Scenario: client with Html pages with Javascript
>Html page needs *.js from the server.
>I am only looking for a simple hiding mechanism.
The "simple" hiding mechanism would be to use the Referer: field to
check that the right page referred to the javascript. You'd need some
sort of CGI/filter/LRWP to serve out the Javascript after checking for
HTTP_REFERER, and to set the path for the javascript appropriately.
This will cause some problems (some things don't send the Referer field,
either deliberately or because they don't know about it), and it's
pretty easy to get around (anyone can write a program that sends
whatever it likes in the Referer field), but it'd cover your "simple
hiding mechanism" case.
Ewen
--
Ewen McNeill, Technical Consultant, iMatix Corporation www.imatix.com