Jump to content

how to clear cache


Hashasm
 Share

Recommended Posts

Hi guys ,

 I am almost done with my game now the only thing to take care is browser cache ..

the problem is when I am changing my json through playing game and if i am trying to fetch that json tmx file its still  giving me the wrong input until i clear my cache and if i clear my cache and cookie my session also removing ..

 is their any way to clear my cache without affecting my session through melon or simple javascript.. please let me know. i am using chrome and mozilla!

 

thanks 

HAPPY GAMING

 

Link to comment
Share on other sites

Just use cache busting. If you are loading the JSON through our loader module, you can set this flag to enable cache busting:

me.loader.setNocache(true);

For reloading the JSON often, just call that function before each reload.

If you are using another method to load the JSON, like XmlHttpRequest, cache busting is just a matter of generating a random string and appending it to the URL query parameters.

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...