In lightning experience, when adding query parameters and reloading the page, they seem to be cleansed from the page on reload, however, fragment identifiers (or hashes) are persistent.



If I add a query parameter:


and reload the page, the params are cleared after the page reload.

However, if I add a hash:


the hash is persists after a page reload...

Is there any reason why query parameters are removed when I reload my page vs hashes ?


The query string is sent to the server, so technically it shouldn't be used in a Lightning App, or indeed any Single Page Application (but some types of apps do use this technique via the History API, which lets you "fake" navigating between URLs). The hash string is only ever used by the client, and this is how Lightning remembers the current state of the app. There's no particular reason why it's cleared out that I know of, other than that's how it's designed to behave.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.