chrome extension specific code to workaround CORS problem and refresh page