Blog


POST IDat1248
DATEat
TITLEatDebug pushState and popState
CONTENT
click=>pushState()
pushState()=>renewContent()
history changed=>popState()
popState()=>renewContent()
click=>pushState()
Firstly, we should make a function like init() and renewContent(), once onpopstate or onpushstate was triggered, then run the init() and renewContent() again, and document.title as the title function of pushState() has some problems to fire.