Avoid caching request on image method
nikhilkumar13 opened this issue · 3 comments
nikhilkumar13 commented
I tried to use the image method. It loads an image, which are allowed to cross domains.
But the request is getting cached which is giving wrong result. how to avoid this? I have the application running on local network but the application also requires the internet connection.
arojunior commented
You should use like the original implementation, passing datetime with the image. So the image will always be different and it will not be cached.
defaultOptions = {
checks: {
image: {
url: function() {
return "/yourimage.jpg?_=" + ((new Date()).getTime());
}
};
elvismercado commented
thank you for suggesting this method @arojunior it helps allot
nikhilkumar13 commented
Yup, I used the same trick