detecting changes in the browser