Window location.pathname attribute
- Previous Page origin
- Next Page port
- Go to the Previous Level Window Location
Definition and usage
pathname
Set or return the path name of the URL (page).
Syntax
Return the pathname attribute:
location.pathname
Set the pathname attribute:
location.pathname = path
Attribute value
Value | Description |
---|---|
path | The path name of the URL. |
Return Value
Type | Description |
---|---|
String | Current Pathname. |
Browser Support
All Browsers Support location.pathname
:
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Chrome | IE | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support | Support |
- Previous Page origin
- Next Page port
- Go to the Previous Level Window Location