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

python - How to create a legend for 3D bar in matplotlib? -

php - Dynamic url re-writing using htaccess -

java - Multi-Label Document Classification -