javascript - http://www.XXXX.com/#/theme, what role does the # symbol play in such a path? Is there no refresh? Element locator?
It feels like the page is not refreshed when switching between different interfaces,
The rule displayed by the url address is /#/
I’m curious about what this rule does, no refresh? Or element locator?
"#" adds parameters to the url in the non-refresh state. You can add any parameters after #
Commonly used in front-end, such as window.location.hash
Generally, single-page applications need to maintain a URL at all times, but they need to switch application status in different business scenarios. At this time, hash is used, which can switch status but will not refresh again. In addition, you can also refer to this article by Teacher Ruan Yifeng Let’s have a deeper understanding of this article about hash http://www.ruanyifeng.com/blo...
In the fragment definition of URL, the characters after # will not be sent to the server, but are used by the browser itself, so many js use the string after # as the URL in a single page.
First of all, # is followed by a large hash value. Although the page is not refreshed, the browser will record it so that you can move forward or backward, especially when making a single page, such as some router routing processing and detecting changes in the URL. window.location.hash