Jump to content

LocalStorage. Do i need a namespace?


j0hnskot
 Share

Recommended Posts

Hello there! 

I'm using localstorage to save some data like scores,credits etc.

What happens if another game on the portal i submitted my game uses the same keyword to store,lets say , the score?

 

Is it possible to mess the player's storage ? Or does the site or the browser takes care of this?

What happens when i use localStorage.clear() ? Does this delete everything on the player's storage? Or just the values i assigned on my game? 

 

Sorry if those questions are dumb but i'm currently got some issues on a game i uploaded on gamejolt.com

 

 

Thanks in advance!

Link to comment
Share on other sites

I'll just describe the problem i got with my game in gamejolt just in case someone can help!

 

The scenario is this:

 

I start the game, i gather 10 credits.

I refresh the page, 90% it will show that i got 0 credits.

I refresh the page again, it will show me i got 10 credits (the correct amount).

 

 

Is this the way gamejolt works? Is this a problem in my side ?

it's like it creates 2 localstorages.

I listed the game on kongragate too, but it works fine! 

Any suggestions?

 

the game : http://gamejolt.com/games/arcade/space-shooter/27340/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...