0

I'm getting data from a form filled in by users. I'm using Javascript and XMLHttpRequest to fill in the data on another form. My issue is that when the user enters their data, the JSON file on my server updates accordingly but it takes time to show on the main page, how do I force javascript to always get the most updated version of my file quickly ?

ekeith
  • 644
  • 1
  • 10
  • 33
  • [Cache-busting](https://stackoverflow.com/questions/9692665/cache-busting-via-params)? You could drive it with a timestamp for the current moment it is being fetched. – Alexander Nied Feb 27 '18 at 04:12

1 Answers1

0

Switch your application to WebSocket if it's possiable - https://github.com/websockets/ws

Thanh Le
  • 763
  • 4
  • 13