What is the difference between loading javascript code directly from a .js file or via .php, as in the following example:
<script type="text/javascript" src="myscript.php?id=1"></script>
$ _GET ['id'] will tell php to load script id = 1 (script1.js)
OR
<script type="text/javascript" src="script1.js"></script>
what is the fastest / most effective / safest way between the two methods above
Thanks in advance.
source
share