fix https://github.com/owncloud/core/issues/3320

Don't let safari reload the page

please review @schiesbn @DeepDiver1975 @karlitschek