//Next script is required to make optifile online work correctly with apple devices var is_safari = navigator.userAgent.indexOf("Safari") > -1; // Chrome has Safari in the user agent so we need to filter (https://stackoverflow.com/a/7768006/1502448) var is_chrome = navigator.userAgent.indexOf('Chrome') > -1; if ((is_chrome) && (is_safari)) { is_safari = false; } if (is_safari) { if (!document.cookie.match(/^(.*;)?\s*fixed\s*=\s*[^;]+(.*)?$/)){ document.cookie = 'fixed=fixed; expires=Tue, 19 Jan 2038 03:14:07 UTC; path=/'; //replace ### with you own customer number window.location.replace("https://636.optifile.net/_safari_fix.aspx"); } }