javascript - Failed to execute 'pushState' on 'History' error when using window.history.pushState function -
i'm using window.history in javascriptmvc application enable back/forward/refresh functionality each controller. every time load new controller i'm using window.history.pushstate add new state history. , on back/refresh i'm using saved state , reuse data build controller again.
the whole idea works fine excepting 1 issue on specific scenario. i'm getting following error:
failed execute 'pushstate' on 'history': object not cloned.
the same data added without problem on other scenario. can cause error? assistance.
https://developer.mozilla.org/en-us/docs/web/guide/api/dom/manipulating_the_browser_history
"the state object can can serialized. because firefox saves state objects user's disk can restored after user restarts browser, impose size limit of 640k characters on serialized representation of state object. if pass state object serialized representation larger pushstate(), method throw exception. if need more space this, you're encouraged use sessionstorage and/or localstorage."
looks simple answer possible state passing in serializing larger 640k. ran bug, , cause.
Comments
Post a Comment