javascript - Why is location.hostname not consistent? -


i have asp.net mvc project, , in 1 of javascripts, calling location.hostname

when host application on mvc, on windows 7 & 8 pcs, able print out localhost/myapp

however, when hosted on windows server 2008 r2 pc, printed out localhost without virtual directory name

why that? , how can display full url?

you might want use:

window.location.href 

or

window.document.documenturi 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -