It was interesting, when I changed the file extension of one of my JavaScript files to ".cl" it had no effect on my JavaScript file.
Aren't JavaScript files just text files? So why do they need the ".js" file extension in the first place? I guess it's a way to recognize the the file as a JavaScript file, in Windows Explorer. But other then that it's not necessary, is it?
superdezign wrote:The <script> tag defines the file type, not the extension. JavaScript isn't server-side, so the server doesn't handle the parsing, the browser does.
Exactly. Which is why I don't see why JavaScript needs any particular file extension, for that matter.
most things don't NEED their extension. It would be kind of lame to try and figure out what belongs to what all the time if you didn't assign extensions to them
The Ninja Space Goat wrote:most things don't NEED their extension. It would be kind of lame to try and figure out what belongs to what all the time if you didn't assign extensions to them
True. Extensions are necessary when it comes to that. But I'm was thinking of taking more of a Java approach with JavaScript by making my javascript files that define a class with the extension of ".cl".