cables is under heavy development.
There might be one or another bug, please let us know about it!

SetLocationHash Op


Namespace: Ops.Website

Op author: stephan

sets window.location.hash to the specified value(s)

allows to manipulate window.location.hash to store data in the url without reloading the page.

given a hash in the first parameter, the op will simply replace the whole part behind the # in the url with the given hash.


Hash (String)

new value for window.location.hash (without the #)

Update (Trigger)
Active (boolean /Number)


Silent (boolean /Number)

make event not trigger LocationHashRoute op

Allow Empty (boolean /Number)

allow for setting an empty hash, usually triggers a page reload

Caught a mistake or want to contribute to the documentation?

Edit Documentation 

LocationHash Example

how to use the browser location bar to navigate and create deeplinks

Open Example In Editor

Youtube Video Tutorial

Patches using SetLocationHash


created op
2021-03-30 - stephan
added lib: navigo.js
2021-03-30 - stephan
Ops.User.stephan.SetLocationHash renamed to Ops.Website.SetLocationHash
2021-03-30 - stephan