I am used to using href="#"
during development as placeholder links so that if you accidentally click on it, nothing happens and it will not jump the page around while testing the page i.e. you know exactly which is a placeholder and which is a broken link.
However, When baseurl is defined in the head, href="#" fetches the baseurl address instead of the current page and appends the # at the end. This causes placeholder links to load the index page always. Annoying.
<!doctype html>
<html>
<head>
<base href="http://localhost">
</head>
<body>
<p><a href="#">placeholder # only</a></p>
<p><a href="">empty string</a></p>
</body>
</html>
Is there a way to get back the "placeholder" behavior other than specifying the full path in the <a>
's href
?