1. A method comprising: receiving, by a processing device executing a browser, a user navigation request via a page presented by the browser, the user navigation request to cause a changed page state of the browser to be presented to a user; updating, by a component within the browser and without executing browser-based application code, a browser history stack of the browser based at least in part on the navigation request, the browser history stack comprising a plurality of entries that each include a respective token associated with a corresponding page state of the browser, wherein the updating is not specific to the type of the browser-based application code; and causing a presentation of the changed page state of the browser based on the updated browser history stack, wherein causing the presentation of the changed page state of the browser comprises: parsing, by the component within the browser, a token from an entry at the top of the browser history stack into a plurality of dynamic segments; generating, by the component within the browser, a map based at least in part on the plurality of parsed dynamic segments, wherein the map is generated based on a structure of browser-based application code without executing the browser-based application code and is not specific to the type of the browser-based application code, and wherein generating the map comprises: accessing a data structure having a plurality of predefined dynamic segment types and corresponding priorities indicating an order of execution for blocks of the browser-based application code; and mapping the plurality of parsed dynamic segments using the plurality of predefined dynamic segment types and the corresponding priorities, to define the order of execution for the blocks of the browser-based application code; and executing, by the browser, the blocks of the browser-based application code based at least in part on the map to cause the presentation of the changed page state of the browser in view of the updated browser history stack.