the refreshing is all handled client side. You could set the header expiration date based on some php criteria, but once you send it to the browser its out of your hands. You can use javascript to handle certain things, but checking the serverside database isn't one of them.