Notes Column Code for Domlog.nsf to Show Browser Version

In trying to do some analysis of the Domino Web Server log to see which browsers (UserAgents) are hitting the server, I decided to create a new view that would show this in a friendly format all neat and categorized.

Basically, I have the formula below in a categorized column. The first pass “OS_Major” is where I do my best to determine the Operating System. The second pass “Browser_Major” adds the Browser name after a backslash. This will cause the Browser name to appear as a subcategory of the OS. And with each Browser name, I’m grabbing the Browser version and making it a subcategory of the Browser name. Just copy one of the existing views and add a column with the code below.

I had to do a fair amount of trial and error. For example, most of the UserAgent string values will have Chrome and/or Safari in the string (I’m looking at you Edge!). So, I had to put the browser versions in the order below so that after it’s found Firefox, IE, and a couple of others we could move on to be more certain of. Typically, especially with the newer browser versions, you would see the browser be the very last entry in the string. But as this formula had to account for older browser versions I think that I needed to to it as it is below (though I’m sure someone has something more elegant than what I’ve done. 😉 )

That leads to something like this:


Categorized Column Formula:

@Contains(UserAgent;”Tablet PC”); “Tablet PC”;
@Contains(UserAgent; “Windows”); “Windows”;
@Contains(UserAgent;”Macintosh”); “Mac”;
@Contains(UserAgent;”X11″); “Linux”;
@Contains(UserAgent;”iPhone”); “iPhone”;
@Contains(UserAgent;”iPad”); “iPad”;
(@Contains(UserAgent;”Darwin”) & @Contains(UserAgent;”x86_64″)); “Mac”;
(@Contains(UserAgent;”Darwin”) & @Contains(UserAgent;”MobileSafari”)); “iOS”;
@Contains(UserAgent;”iPhone”); “iPhone”;
@Contains(UserAgent;”Android”); “Android”;

@Contains(UserAgent;”Firefox”); “\\Firefox\\” + @Middle(UserAgent; “Firefox/”;”.”);
@Contains(UserAgent; “MSIE”); “\\Internet Explorer\\IE ” + @Middle(UserAgent; “MSIE “;”.”);
@Contains(UserAgent; “rv:11”); “\\Internet Explorer\\IE 11”;
@Contains(UserAgent; “Edge”); “\\Edge\\” + @Middle(UserAgent; “Edge/”;”.”);
@Contains(UserAgent;”OPR”); “\\Opera\\” + @Middle(UserAgent; “OPR/”;”.”);
@Contains(UserAgent;”Chrome”); “\\Chrome\\” + @Middle(UserAgent; “Chrome/”;”.”);
@Contains(UserAgent;”MobileSafari”); “\\MobileSafari\\” + @Middle(UserAgent; “MobileSafari/”;”.”);
@Contains(UserAgent;”Safari”); “\\Safari\\” + @Middle(UserAgent; ” Safari/”;”.”);
@Contains(UserAgent;”BeagleSearchEngine”); “”;

OS_Major + Browser_Major

3 thoughts on “Notes Column Code for Domlog.nsf to Show Browser Version

  1. Just be careful. The complexity of this formula in such a big view could make it quite slow to open.We limit the number of records in domlog by setting the “Remove documents not modified in the last xx days” in the application replication properties. Oddly you not need to check the tick box. There may be a better way.


    1. Sean, yes! We also set the “Remove documents …” parameter for the domlog. Usually at only 10 days unless the data needs to be retained. Sometimes I will even add an @adjust to a view and only show x days of documents. It makes it slow to open, but it’s an admin view that isn’t being accessed frequently anyway. Running some updall program documents could help here as well to at least have it refreshed daily.

      A better way would be to use the text log files and scan them with a third-party application. But often we admins/consultants are restricted from accessing servers and installing such software. But this was an interesting little formula to achieve what I needed.

      And, really, who’s using IE5 still?!? 😀


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s