[thelist] ASP to populate .js file?

Stephen Caudill SCaudill at municode.com
Wed Apr 7 12:54:35 CDT 2004

--------------- Ken Schaefer wrote: --------------- 
: I disagree. Unless you get some kind of performance benefit from
: being able to cache a static version of the .js file (by
: persisting it to disk), the method suggested (creating .js files
: physically) will be slower than building the .js on the fly.
: On the other hand, if you have a lot of requests for single
: versions of the .js file, then the performance benefits of
: persisting the content to a static .js file would make this
: method a no brainer. 
: Cheers
: Ken

Right.  I agree with you Ken, it will be quicker to generate the
JS dynamically inside and ASP page (see my second post in this 
thread.  However.......

The original post asked for a way to have ASP in a .js file
which insinuates that a separate (JS) file is a necessity.  IMO, 
this is bad from the get go in every scenario I can envision.  But 
I try to question peoples motives less these days than in the early, 
heady days of standards evangelization :)

So, my comment was in response to Maximillian stating that it would
be better to have an ASP file which dynamically created the JS.  
Given what was asked for, I thought this innappropriate and 
suggested that you have the ASP file that would require the .js
update said .js dynmically based on the current state of the database. 
Maybe something like a JS menu whose contents depended on data in
the database.  All while not asking why it was necessary to have a
separate JS file (assuming there were reasons beyond my knowlege 
that this was a requirement for).

If I were approaching something like this, I'd likely not use JS at
all because it sounds like you're building core functionality on 
client side technology :(  However, since this appears to be a 
vapor-post, we can only speculate at this point.


More information about the thelist mailing list