Any smart way of doing a \"root\" based path referencing in JavaScript, just the way we have ~/ in ASP.NET?
~/
Another option that's a bit simpler and more universal would be to take the following:
then regardless of what subdirectory the urls will always be rendered correctly.