Best practices for dynamically generating JavaScript
<p>What is the best way to add dynamic content to JavaScript?</p>

<p>A couple possibilities are:</p>

<ol>
<li>Place the JavaScript in a dynamically generated Ruby/JSP/Python/PHP/etc. file rather than a JS file.</li>
<li>Use a JavaScript literal.</li>
</ol>
