[thelist] ASP to populate .js file?

Maximillian Schwanekamp anaxamaxan at neptunewebworks.com
Wed Apr 7 11:33:48 CDT 2004


>Simpler? I don't think so.  More elegant?  Not if you adhere to any
>ideal of semantic correctness of file contents.
<snip>
>If you want an ASP file that dynamically writes JS, why not just
>have the ASP file that wants this .js file create inline JS?

I am curious what this means.  What in semantics says that a requested page
which outputs javascript code must be a static file with extension .js?  To
me it seems sensical to have a single script (ASP, PHP, etc) whose output
can be cached by the browser (if the browser is told to do so) during the
user session for efficiency of requests, and whose construction is as simple
as creating a script that gives HTML output.  I fail to see a significant
difference between giving HTML output and JavaScript output to the browser.
Inline JS is search-engine-hostile and inefficient in terms of bandwidth, so
it makes sense to make the browser cache the JS as an external file.

Christian?  More details?

Maximillian Von Schwanekamp
NeptuneWebworks.com
voice: 541-302-1438
fax: 208-730-6504





More information about the thelist mailing list