"Hywel Jenkins" <> wrote in message
news: ...
> In article <7oudnZ5Jp_PqnGzcRVn->,
> says...
> > "David D." <daviddiamond.remove-if-not-> wrote in
message
> > news
9idnQ6c8MsDZW3cRVn-...
> > > Does the file extension matter when including a JavaScript file in an
HTML
> > > page?
> > >
> > > Normally, one would include a JavaScript file in an HTML page using
> > > <script src="foo.JS" type="text/javascript">
> > >
> > > However, I have found that I can use an alternate file extension, such
as
> > > <script src="foo.HTML" type="text/javascript">
> > >
> > > It works fine with my IE 6 and Mozilla. Will it work with other
browsers?
> > >
> > > - David D.
> > >
> > > P.S., Why, you may ask, would I want to do such a crazy thing? My
web
> > site
> > > host uses a web-based HTML editor. Unfortunately it only allows you
to
> > edit
> > > files that have .HTM or .HTML extensions.
> >
> > AFAIK, any extension will work. In fact, ASP developers often assign
".asp"
> > as the extension which "hides" the source of the script; that is, a
visitor
> > can't load the source code as a page by typing in the URL of the
include.
>
> Does that hide any client-side code. Surely the ASP engine only parses
> any code that's in the ASP delimiters. Got a demo URL of this
> behaviour?
>
> --
> Hywel http://kibo.org.uk/
> I do not eat quiche.
http://www.planetsourcecode.com/vb/s...eId=7252&lngWI
d=4
"Prevent unauthorized viewing of website javascript and style sheet files.
Simply rename all your style and javascript files to the .asp extension."
However, they're still in the browser's cache.
I can't remember but here's a skeleton of it:
<< includer.asp >>
<% Const cASP = "includer.asp" %>
<html>
<head>
<title><%=cASP%></title>
</head>
<body>
<script type="text/javascript" src="included.asp"></script>
</body>
</html>
<< included.asp >>
<% {something} %>
document.write("included.asp");
Perhaps I should just say "Nevermind!" as I'm not sure anymore.
Maybe someone else will jump in...