Sign in to follow this  
Followers 0
Hashasm

how to clear cache

2 posts in this topic

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

 

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.