HTML5 Wipe INI (clear) or Clear cache

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I use INI extension for my Windows game. While porting game on HTML5 for itch.io i understand that i cannot start new game, because HTML5 doesn't support File extension. So i cannot delete a save.ini file.

    I need a way to clear save.ini to blank. Any suggestions?

    P.s. my personal thought is to make new save every time player start new game. Like save1.ini, save2.ini etc. But if there is a way to clear browser cache or wipe ini file (so i will always use same save.ini) i would like to know

  • Hello, I don't get how to use that code in order to let the browser clear the cache.. where should I put that "window.location.reload(true)" ? I'm talking about an HTML5 application..

    The problem: when I deploy a new version of an HTML5 application on a remote webpage, the browser does not load the new version, but instead uses the one that it's still in the cache. Pressing CTRL+SHIFT+Reload fixes it in the browser, but not all the users are aware of this. I would like that the browser shows automatically the new version. Is there a way to accomplish this ?

    Any help would be appreciated.

    Best regards,
    Sergio

    Edited once, last by semar (March 19, 2024 at 12:18 PM).

  • Hi. Sure.

    1. Open with Notepad "index.html" file that you create after "Build".

    2. add somewhere between <head> and </head>:

    Code

    Code
    <script>
    
    function clearfile(text)
            {
                localStorage[text]="";
            }
    
    </script>

    3. Go to Clickteam and add HTML5 extention

    4. Go to events tab. Add 3 actions on event that will erase your data:

    - reset parameter (HTML5)

    - add string parameter "yourfilename.ini"

    - call function clearfile

    That's all

    Don't forget to uncheck create index.html in app properties, HTML tab

    If you have several files in cash you can use "localStorage.clear();" instead of "localStorage[text]="";"

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!