You can do this on the client in javascript with some good old fashioned DOM manipulation:
var count=30;
var interval=setInterval(function()
{
var tn=document.createTextNode("Refreshing in "+count+"s");
var targetElement=document.getElementById("someElemId");
var replaceText=targetElement.childNodes[0];
if(replaceText!=null)
{
targetElement.replaceChild(tn,replaceText);
}
else
{
targetElement.appendChild(tn);
}
if(count==0)
{
clearInterval(interval);
window.location.reload(true); //or whatever you need to refresh
}
--count;
},1000);
You'll need some sort of element in the DOM with id "someElemId". Of course, setInterval isn't 100% accurate, but should be good enough.