If I have my application hosted in a directory. The application path is the directory name.
For example
http://192.168.1.2/AppName/some.html
How to get using javascript the application name like in my case /AppName.
document.domain is returning the hostname and document.URL is returning the whole Url.
EDIT
Thr app path could be more complex, like /one/two/thre/