How do I clear browser cache and cookie?

0 favourites
From the Asset Store
This is a single chapter from the Construct Starter Kit Collection and the Student Workbook from the Workshop.
  • How do I clear browser cache and cookie? I want to clear my game's cache and cookie. To make sure that all the images and data load using load image from url could be fresh.

  • On Chrome it's under history > clear browsing data > cached images and files. Other browsers have a similar kind of thing.

  • On Chrome it's under history > clear browsing data > cached images and files. Other browsers have a similar kind of thing.

    Sorry, but I want to clear cache and cookie in game, not make the player do that. I want some thing like a behavious of browser object or a plugin.

  • Please anyone know? In our game we make sprite to download image using download imgae from url, so we want to clear the cache and also the coockie of our game.

  • Ashley, hi do you know there is any way?

  • I'm not an expert on JavaScript, but maybe calling this method using the Execute javascript action from Browser object would do the trick.

    Hope this helps.

    Cheers!

  • Use the 'Clear storage' action of the Local Storage object.

  • Use the 'Clear storage' action of the Local Storage object.

    Thank you I will try!

  • I'm not an expert on JavaScript, but maybe calling this method using the Execute javascript action from Browser object would do the trick.

    Hope this helps.

    Cheers!

    Thank you I will try!

  • Use the 'Clear storage' action of the Local Storage object.

    The 'Clear storage' action could help me to clear the local storage, and it works. But it does not clear our website's cookie and caches, is there any way to clear them? Thank you!

    The issue is after we upgrade our game by replace the game folder on our server, and we don't want to change the game's URL, player who played older version will continue load the older version from cache. They can not load the new version.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The game should update automatically. You can also use the Browser object to detect if an update is available and prompt them to reload. Trying to force all browser storage to be cleared is the wrong approach.

  • The game should update automatically. You can also use the Browser object to detect if an update is available and prompt them to reload. Trying to force all browser storage to be cleared is the wrong approach.

    thank you for your answer! But after we replace the new game version on server, the player opened his browser to start the game, and then the game is running the older version. In this case, player could do something that we do not want(for example the older version have some bugs or something we dont want anymore), we don't want the older version to be opened anymore at any time...

  • You can also use the Browser object to detect if an update is available and prompt them to reload.

  • > You can also use the Browser object to detect if an update is available and prompt them to reload.

    We tried, but after we delete the game on server and upload the new one with same name, we waited for a while but no Browser update found or ready action triggered...Then we reload the page, and not get triggered...

  • That probably means the server caching settings are wrong, which is the problem you should be solving instead.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)