Hi,
Does anyone know how to disable cache on table-tv.js magic hook file?
It seems every time made changes and the browser still cache on the old table-tv.js file
Thanks in advance.
Prevent table-tv.js Being Cached
Re: Prevent table-tv.js Being Cached
Hi,
Found the solution on others forum.
Hopefully this could help anyone facing the similar issue.
First input this JS script in footer-extra.php
tablename-tv.js is where is = database table name
Lastly, clear any browser exiting cache and after that every changes on that particular tablename-tv.js file will not cache as the version keep changing itself.
Regards,
Andrew.
Found the solution on others forum.
Hopefully this could help anyone facing the similar issue.
First input this JS script in footer-extra.php
Code: Select all
<script type="text/javascript" language="javascript">
var versionUpdate = (new Date()).getTime();
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "/hooks/tablename-tv.js?v=" + versionUpdate;
document.body.appendChild(script);
</script>
Lastly, clear any browser exiting cache and after that every changes on that particular tablename-tv.js file will not cache as the version keep changing itself.
Regards,
Andrew.