speed hack: store pages and doctypes in localstorage