CSS font stacks & developer FAQs with Web standards
Site navigation below

One of hundreds of answers available with our premium content service.

Part answer, see below for more

A: The URL of the current page is represented by the Javascript window.location object. There are several components to the location object that represent parts of the URL. The relative URL of the page is given by the location.pathname property, plus any query or "search" part and fragment identifier or "hash". Not all URLs include a query and fragment identifier, so these properties may be null and need to be checked, as below.

… full answer hidden

Click for full answers

Premium members click below for full answer
How can I get the relative URL of a page?

Premium service benefits

Your premium content subscription is a single payment that gives you:

Home · Web fonts · Font stacks · FAQs · Java · CSS · Javascript · HTML · Site manager