re-assign history after BFCache back

History variable should be handled like the location variable after BFCache back