D
David D.
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.
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.