Modify refresh to be a javascript timeout