Hello I am trying to create a script which inserts into any webpage a meta tag to force no-cache.
Currently this is my code and I dont want to use Jquery (as shown in Script to force IE8 cache behaviour).
var MAXlen = document.getElementsByTagName('head')[0].childNodes.length;
//Get the length of childnodes of head.
while(MAXlen--)
{
document.getElementsByTagName('head')[0].childNodes[MAXlen+1] = document.getElementsByTagName('head')[0].childNodes[MAXlen];
//store every node one place after.
if(MAXlen == 0)
document.getElementsByTagName('head')[0].childNodes[0].innerHTML = '<META HTTP-EQUIV="Pragma" CONTENT="no-cache">';
//place this hmtlcode into the first element of head.
break;
}