gs.getSession().getProperty('user_agent_version') is null for IE when logging in via CMS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2015 10:09 AM
I am trying to create a processor (similar to KnowledgeHomeLauncher) to take people to an alternate page if they are using an older browser version.
What I have found is that if you initially log in to ServiceNow (/navpage.do), you will get the correct browser version if you log in via IE11 if you later go to the CMS:
var browser_version = gs.getSession().getProperty('user_agent_version')+''; // returns 11
However, if you log in directly to the CMS - bypassing navpage.do - that same call returns null.
Is there something needs to be added to the CMS login page to appropriately capture session information?
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2015 07:27 PM
you can grab the browser info/version using this javascript call on any dynamic content block page (probably most useful in the header), that way if someone tried to change browsers, it will still work correctly as opposed to using the getProperty command above which does not always update correctly for multiple logins for the same users on difference browsers.
<script>
var ua = navigator.userAgent.toLowerCase();
( add your code to parse or evaluate the browser version here , and\or redirect as needed )
</script>
there is a good article on stackoverflow on parsing the returned value located here
http://stackoverflow.com/questions/2400935/browser-detection-in-javascript
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2015 10:52 PM
Thanks, Robert. I'm familiar with browser detection in Javascript and will consider that as a workaround for the time being.
However, the fact that the user_agent_version isn't populated when logging in via CMS makes me wonder if there are other session variables that may not be populated correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2015 04:33 AM
I was able to duplicate your null value issue listed above in my own dev instance, so I certainly can understand the concern, I would recommend opening a HI ticket with ServiceNow to have them address this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2015 09:20 AM
Yes, I've gone ahead and done that and a problem record was created by SN. Thanks!