There are times when we want to prevent a particular web page from being cached by a browser. The main problem with this is that not all the codes that are used to prevent caching always work. In fact, certain browsers are not affected by a particular code that may work with another one. What this usually leads to is one having to load a number of HTML codes hoping that even one of them will work. This is not a tedious task because there are only a few lines of code that are actually needed to accomplish the feat. In essence, there is really only one line of HTML code that is really needed.

If you want to prevent any web page you may have from caching, here are the codes that you will need:

Place these between the <head> and </head> tags:

<meta equiv="Pragma" content="no-cache">
<meta equiv="cache-control" content="no-cache">
<meta equiv="expires" content="0">
<meta equiv="cache-control" content="no-store">

In addition, place them after the </body> tag and before the </html> tag like this:

</body>
<meta equiv="Pragma" content="no-cache">
<meta equiv="cache-control" content="no-cache">
<meta equiv="expires" content="0">
<meta equiv="cache-control" content="no-store">
</html>

Placing them after these tags will serve as an extra precaution to ensure that they are executed.