title: Getting the current script executing filename in javascript
body: <p>Okay, I've been searching for this for way too long already... I'm trying to find out how I can return the filename of the page that's running an included javascript, from inside that javascript. </p>
  
  <p>I can easily do this in PHP using <code>$_SERVER['SCRIPT_FILENAME']</code>, but in Javascript this seems to be a lot harder. </p>
  
  <p>Do I really need to substring it from <code>location.href</code> or is there a more efficient way? Could jQuery help?</p>