Re:Why I hate your Single Page App
by cpburns2009 on Thursday August 31, 2017 @02:55PM
(#15142804)
Oh, I see. For saving the form state, localStorage would work better than cookies for saving and restoring because then the information is only kept on the client. That still doesn't solve the multiple window problem, but that's likely less of an issue for a filling out a form than for navigation.
Cookies can certainly be set to never expire, but you don't know which window the cookie was intended for because the cookies are shared.
I wasn't aware. Are you talking like HTML5? Haven't used local storage before. Thanks for the info.
Re:Why I hate your Single Page App
by cpburns2009 on Friday September 01, 2017 @08:14AM
(#15147690)
Yes, see Window.localStorage [1] and this short guide [2].
[1]: https://developer.mozilla.org/en-US/docs/Web/API/Window/loca...
[2]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage...
thanks for the references, I'd like to start using it at some point. Would be cool to check the client's device capabilities/run a specific event based on conditions met.
I finally used memcache(d) so that's cool.
Interesting about the separate window, thought cookies could be set to never expire.