A Model of Navigation History

Aug. 18, 2016
RH-thumbnail-02

Oersjoch

Navigation has been a core component of the web since its inception: users and scripts can follow hyperlinks, and can go back or forwards through the navigation history. In this paper, we present a formal model aligned with the whatwg specification of navigation history, and investigate its properties. The fundamental property of navigation history is that traversing the history by δ then by δ 0 should be the same as traversing by δ + δ 0 . In particular, traversing by +1 (forward) then by −1 (back) is the same as traversing by 0 (doing nothing).

We show that the specification-aligned model does not satisfy this property, by exhibiting a series of counter-examples, which motivate four patches to the model. We present a series of experiments, showing that browsers are inconsistent in their implementation of navigation history, but that their behaviour is closer to the patched model than to the specification-aligned model. We propose patches to the specification to align it with the patched model.