/ Published in: JavaScript

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// this goes in the head section <script type="text/javascript"> <!-- var date = new Date(); var cacheHourly = date.getHours()+"_"+date.getDay()+"_"+date.getMonth()+"_"+date.getYear(); var cacheDaily = date.getDay()+"_"+date.getMonth()+"_"+date.getYear(); var cacheMonthly = date.getMonth()+"_"+date.getYear(); --> </script> // this goes in the body section <script type="text/javascript"> <!-- var cache = Math.random(); document.write ('<p class="linkPDF"><a href="somedocument.pdf?cache='+cache+'" target="_blank">Some Document</a></p>'); --> </script>
Comments
