0

I'm making url shortener and noticed some webesites including stackoverflow is putting "#/" in the end of the url.

https://stackoverflow.com/#/
https://stackoverflow.com/

it looks like it can be safely removed and url will open anyway. What this "#/" even do, and it is safe to remove it?

I know why "#" is used in urls, but what the purpose of "#/" in the end of the URL? As I understand, it can be removed and result link will open the same page.

rendom
  • 3,417
  • 6
  • 38
  • 49
  • Does this answer your question? [Usage of Hash(#) in URL](https://stackoverflow.com/questions/21850093/usage-of-hash-in-url) – jonrsharpe Feb 15 '22 at 09:16
  • The "default" meaning is to allow the link to name an anchor on the page so that the browser will scroll to it. In this context, it would be "safe" in the sense that the page will still open, but it wouldn't scroll to the intended location. The hash and whatever is named behind it is also available to the javascript running in the page, and what that might do with it will depend on the site. A typical usage is for single-page applications, to show the right content. I would recommend you do **not** remove it. – Lasse V. Karlsen Feb 15 '22 at 09:16
  • @LasseV.Karlsen yeah, but what "#/" do? is there any purpose for it? – rendom Feb 15 '22 at 09:47
  • That would depend entirely on the site. There is no way to meaningfully answer that question unless you ask about a specific site, and then, most probably only the site developers would know the answer to it. – Lasse V. Karlsen Feb 15 '22 at 09:57

0 Answers0