I
I
Ilya Korol2019-09-06 20:34:45
Django
Ilya Korol, 2019-09-06 20:34:45

How to get URL anchor?

How to get URL anchor?
There is a URL: localhost/user/admin#1
In this URL, the number "1" is used as an anchor.
How to get this number from this URL from the server side?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2019-09-06
@welcome32

This part of the URL is not passed to the server according to the HTTP standard. There is only one crutch - to receive it in the javascript code and send it with an ajax request. But it is better and more correct to completely get rid of the need to transfer it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question