window.location.href : It is located on which page it gives you the full link.
window.location.pathname : Getting current page pathname.
Sample :http://www.engincode.com/Makaleler/network/wireshark-giris-/35 Let us page.
var path = window.location.href;
path value http://www.engincode.com/Makaleler/network/wireshark-giris-/35 will.
var path = window.location.pathname;
path value /Makaleler/network/wireshark-giris-/35 will.
Sample If we want to get the value of 35 in the same page link
var path = window.location.pathname.split('/')
path value 35 will.