Edit this page

up.history up.history.push(url)
JavaScript function

This feature is experimental. It may be changed or removed in a future version.

Adds a new history entry and updates the browser's address bar with the given URL.

When the user restores the new history entry later, Unpoly will replace a selector from up.history.config.restoreTargets with the body from that URL.

Note that fragment navigation will automatically update the browser's location bar for you.

Does not add a history entry if the the given URL is already the current browser location.

Emits event up:location:changed.

Parameters

url string

The URL for the history entry to be added.