I would like to start first with the fact that I know that there are more than several hundred questions in regards to this topic. However, after trying and trying I still do not have a solution to my issue. That is why I would be really grateful if someone can help me out.
I will tell you ver briefly what I am trying to do. I have one file uploaded on my hosting (public_html) folder named index.html.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
Random text.
</body>
</html>
What I would like to achieve is that the moment I change the "Random text." to something else and go to www.mydomain.com/index.html to be able to see the change I made.
I have tried to following solutions:
Number One:
$(document).ready(function() {
setInterval(function() {
cache_clear()
}, 3000);
});
function cache_clear() {
window.location.reload(true);
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
Number Two:
<IfModule mod_headers.c>
Header set Cache-Control "no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires 0
</IfModule>
Number Three
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
but for my disapointed none of these methods was a solution to my problem.