Return to Snippet

Revision: 35563
at November 10, 2010 09:10 by dkevey


Initial Code
// 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>

Initial URL

                                

Initial Description

                                

Initial Title
Cache busting script

Initial Tags

                                

Initial Language
JavaScript