0
How to clean the cache IE via a javascript function?
I want every time you click on a particular button, run a function that cleans the cache of IE 10 and 11.
I used:
function atualiza() {
setTimeout(function () { window.location.reload(true); }, 3000);
}
<button ng-click="editar()" type="button" class="btn btn-primary btn-md atualizar-edicao" data-dismiss="modal" id="" onclick="atualiza()">
<span class="glyphicon glyphicon-ok-sign"></span> Salvar
</button>
But he doesn’t clean the cache.
How is your button?
– Maniero
@bigown I added details to the question
– Isa
You can’t clean the cache code browser
– Bruno Costa
@Serious Brunocosta? There’s no way to force this?
– Isa
The @Brunocosta is right, if desire does not give, it would be a huge security breach. If you just want your page to be reloaded guaranteed from the server and not from the cache, just improve this code a little and should already be right. Resign yourself to that.
– Maniero
@bigown this is a temporary solution, I will not let this solution implemented. These are tests I am applying. What I need right now is to force the cash cleaning, because when I give refresh, it does not have the expected behavior, now when I give the crtl+shift+del and clean the cash, it works correctly. When I give only this command, it keeps keeping the cash, and does not update the changed information
– Isa
@bigown is that I only have the expected result, when clean cash, but if you have any way to force this update, also serve, I’m accepting suggestions..
– Isa
So fix the error that is preventing the expected result, do not gambiarra, that lucky nor can.
– Maniero
@Mustache if I knew how to fix it would have solved for sure. You said that "just make sure your page is reloaded from the server and don’t take it from the cache" how do I do that? you can demonstrate?
– Isa
If the problem is the cache, then disable it.
– Max Rogério