The website I’m working on allows users to delete documents. Because it uses ajax, a dialogue pops up when you click the delete button, then requiring you to hit confirm. The plug-in I use for the dialogue then calls a function which should first send the ajax request and then reload the page.
For some reason, the page never truly reloads. It seems to be getting data from the cache. I have tried all the solutions I could find online and on stack overflow, but none of them force it to refresh. Does anyone have an idea how I can fix this?
There is very little details here to work from, so I will guess.
Plugin is not using
window.location.reload()but it just sets window location to some url withwindow.location = '/somepath'that has already been fetched.Make sure that the url it’s loading returns no-cache headers from server side and no ETag headers.
Alternative change the plugin to add some random parameter on the url