Generation of the HTML history