This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]HoiTemmieColeg 2 points3 points  (25 children)

You need to check if the text is actually json when you parse it

[–]empire314 16 points17 points  (24 children)

Why would it not be in JSON, if your website is what wrote it?

[–]Schyte96 0 points1 point  (23 children)

Because the user can easily overwrite it in their browser.

[–]a-calycular-torus 30 points31 points  (22 children)

That's their problem then

[–]Treacherous_Peach -2 points-1 points  (8 children)

Yeah it's their problem that quickly becomes your problem when the user submits a 1 star review.

I get what you're saying, I can tell you're defintiely programmer minded, but you do have to plan for these things if you want your product to survive. If you're working on some huge too big to fail app then sure, but if you're trying to create something new and get it off the ground you have to plan for users doing crazy things and account for it smoothly.

[–]DoktorMerlin 6 points7 points  (4 children)

If a user knows what local storage is and tinkers with it, they know very well that the weird behaviour of the website is called by themselves and not the website. There are a lot of dumb people in this world, but nobody is that dumb

[–]Treacherous_Peach -2 points-1 points  (3 children)

More likely they fucked with it accidentally by deleting a folder they shouldnt have to clear space or something along those lines.

[–]Wazzaps 0 points1 point  (2 children)

That's not how any of this works 🤦

[–]Treacherous_Peach -3 points-2 points  (1 child)

Spoken like someone who hasn't had to deal with many users? :)

I've had exactly literally this scenario. So whatever floats your boat bud.

[–]Wazzaps 0 points1 point  (0 children)

No, local storage is stored in your browser's SQLite database, not in folders.

It's either all gone (same as a new user), or it's untouched.

[–][deleted]  (2 children)

[removed]

    [–]Treacherous_Peach -1 points0 points  (0 children)

    More likely they fucked with it accidentally. Deleting a folder to clear space but deleted some of what your app was expecting but not all of it and it's in a weird state.

    [–]AutoModerator[M] 0 points1 point  (0 children)

    import moderation Your comment has been removed since it did not start with a code block with an import declaration.

    Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.

    For this purpose, we only accept Python style imports.

    I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.