What Is It When a Link Has a Pound "#" Sign in It

What is it when a link has a pound # sign in it

It's a "fragment" or "named anchor". You can you use to link to part of a document. Typically when you link to a page, the browser opens it up at the top of the page. But you link to a section half-way down, you can use the fragment to link to that heading (or whatever).

If there is no <a name="whatever"/> tag within the page, then the browser will just link to the top of the page. If the fragment is empty, then it will also just link to the top of the page.

For a fragment only <a href="#">Link name</a>, then that's just a link to the top of the current page.

You often see that kind of link used in conjuction with javascript. Standards compliant HTML requires a href attribute, but if you're planning to handle the request with javascript then "#" serves as a reasonable place holder.

Pound sign in url

Because that's the why the "referer" header field is specified to work? (see http://greenbytes.de/tech/webdav/rfc2616.html#header.referer)

Pound sign on vue router links

use mode as history

 const router = new VueRouter({
mode: 'history',
routes: [...]
})

Also need server configuration Apache

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>

check more details here

Hyperlink (a href) with a pound sign at the end doesn't do anything in Firefox

You'll need to make the link go to a different script page which will then redirect the browser back to the original page.

what is the #! sign in the url what does it mean?

It's called a URL HASH and is used for in-page bookmarking. It is now also used to maintain page state in AJAX applications. Anything after the # can easily be parsed and re-written without forcing a page reload, allowing the JavaScript code to load/hide/show page elements based on the developer's choosing.



Related Topics



Leave a reply



Submit