jquery get origin and path name code example Example: jquery get origin url console.log(window.location.origin);