Hi guys,
I was wondering, are you aware of any best practice for specifying absolute URLs in external javascript files? I'm looking for a maintainable solution.
The basic scenario is when i need to include css files at run-time through javascript, or make ajax calls to some URL, and other situations where you would normally need to specify URLs inside (external) javascript files.
If you were to change the server, or maybe introduce mod_rewrite, how do you prevent manually editing all the urls within the js files?