September 2024
Beginner to intermediate
985 pages
35h 37m
English
Using the object stored in the location property (which is of the Location type), you can access information regarding the URL of the web page currently loaded in the browser window or tab.
A URL consists of different components, as shown in Figure 8.5. Among other things, a URL consists of a protocol, the host name, a port specification, a path specification, and query parameters. The properties to access the individual components of a URL are listed in Table 8.8.
Figure 8.5 The Components of a URL
|
Property |
|---|
Read now
Unlock full access