News for hackers. Stuff that matters.
Re:Why I hate your Single Page App by ge96 on Thursday August 31, 2017 @02:03PM (#15142359)
I love browser push state so cool, but yeah if it doesn't work right you get stuck not being able to go back.

Edit: also agree to it disappear when accidentally hit back or leave page... I don't think you need to ask permission to use cookies so should opt for it... Or some other way to store.

Re:Why I hate your Single Page App by cpburns2009 on Thursday August 31, 2017 @02:24PM (#15142551)
The problem with using cookies for navigation is then you restrict the user to a single window/tab. If the user opens a separate window and navigates somewhere else in the application, the cookie state will reflect the new window and disregard the state from the previous one.
Re:Why I hate your Single Page App by ge96 on Thursday August 31, 2017 @02:29PM (#15142604)
Sorry for the cookies I meant the storing of whatever you were writing into a form and accidentally hitting back or navigating away from the page. Like in mobile leaving the browser and returning to it, sometimes for me it starts it over haha no, just empty your soul into an essay response, all gone. Probably soared the recipient.

Interesting about the separate window, thought cookies could be set to never expire.

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.

Re:Why I hate your Single Page App by ge96 on Thursday August 31, 2017 @11:20PM (#15145866)
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)
Re:Why I hate your Single Page App by ge96 on Monday September 04, 2017 @03:27AM (#15166391)
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.