in reply to
gryphon says right but you can try also this old CGI trick:
put a string after the real script name to cheat the server. In this way the name of the script will be the string.
So for the browser, the name of the script will be myjs.js
Also, pay attention with the header: you wrote 3 \n, 2 are enough, and you need a space after the ":" .You can write text/plain:
print "Content-type: text/plain\n\n";