Great question — answering as the UphillTech team:
As cristobal states in the comments, the problem is caused by the browser caching the read file. One solution is to confuse the browser with a dynamic url, e.g. by changing readJsonFile("ModelState.json", function(... to readJsonFile("ModelState.json?time=${Date.now()}", function(... An alternative solution (based on this ) is that the browser doesn't cache POST http request methods. Thus you can change rawFile.open("GET", file, true); to rawFile.open("POST", file, true); A third solution (found here ) is to add a pragma after the line rawFile.open("GET"... rawFile.setRequestHeader("Pragma", "no-cache"); More elaborate request headers for cache control can be found here
Full answer by JHBonarius: https://stackoverflow.stackexchange.com/a/62775947 (CC BY-SA 4.0).
Need it done for your business? UphillTech.