- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2022 06:31 PM
Hello everyone,
We recognize that the recommended browsers for ServcieNow are as follows.
・ Google Chrome (from the latest version to the release version two years ago)
・ Microsoft Edge (from the latest version to the release version two years ago)
・ Firefox (from the latest version to the release version two years ago)
・ Safari (Safari 12.0 or later)
There is a concern that it will not work with non-recommended browsers such as input control processing, and unexpected values may be input.
What we want to do is as follows,
If the portal screen is accessed from a browser which is not the recommended browser, the use of the website is blocked by redirecting to the recommended browsers. Of Course,There is no problem with Redirecting after logging in.
■ Question
1. If there is a client script to get the browser information (even if it is not a client script), Where is it getting the browser information?
2. When redirecting, I also want to send a message such as "Not available in your browser."
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2022 06:37 PM
Add the Script into the widget which is cloned from login widget .
Script is like the line from3 to 18.
//judge the browser
var agent = navigator.userAgent.toLowerCase();
console.log("ABCD"+agent);
//write the redirect link
var redirectPass = 'https://www.microsoft.com/ja-jp/edge';
if (agent.indexOf("edg") != -1 || agent.indexOf("edge") != -1 || agent.indexOf("chrome") != -1 || agent.indexOf("safari") != -1 || agent.indexOf("firefox") != -1) {
console.log("The browser is one of which Edge、chrome、safari、firefox");
} else {
console.log("Browser is not anyone of which Edge、chrome、safari、firefox.");
//redirect
alert("The browser could not be using");
location.href = redirectPass;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2022 06:37 PM
Add the Script into the widget which is cloned from login widget .
Script is like the line from3 to 18.
//judge the browser
var agent = navigator.userAgent.toLowerCase();
console.log("ABCD"+agent);
//write the redirect link
var redirectPass = 'https://www.microsoft.com/ja-jp/edge';
if (agent.indexOf("edg") != -1 || agent.indexOf("edge") != -1 || agent.indexOf("chrome") != -1 || agent.indexOf("safari") != -1 || agent.indexOf("firefox") != -1) {
console.log("The browser is one of which Edge、chrome、safari、firefox");
} else {
console.log("Browser is not anyone of which Edge、chrome、safari、firefox.");
//redirect
alert("The browser could not be using");
location.href = redirectPass;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2022 10:10 AM
Today I was lucky to find this solution after searching many times. Thank you so much @yin2
I have a question on SSO. Our employees use single sign-on and do not use how that will work.