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

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -