Add cookie support and update uri timely