How to Create a Report of Browser Versions from IIS Logs?

You may wonder what type of browsers your visitors have. The best way to collect this information is using an analytics service such as Google Analytics.

What if you don’t use any analytics service but still want to collect browser stats? Your only option is that digging into web server logs.  However, it’s not easy because web server logs provide user-agent data. It doesn’t provide direct browser information.

Here is how IIS logs look like:

How to Get Browser Info from IIS Data?

Follow these steps to convert raw IIS log to meaningful browser stats:

  1. Copy IIS logs to a folder (IIS logs are typically in C:\inetpub\logs\LogFiles)
  2. Install and run Log Parser Studio
  3. Click “Log” icon. Select the folder of your log files
  4. In “Library” tab, double click “IIS: User-Agent Report
  5. Click “Execute” icon (red exclamation mark). Now you have user-agent stats
  6. In order to map user-agent information to specific browser version, you can use one of these free parser tools: One, two, three
  7. Finally, use an Office product like Excel or an online service such as Canva to visualize your data

You will need to parse user-agent strings one by one.

Is there a way to parse all them at once?

Yes! Some of these parser tools provide API. You can develop a small application to query this API and parse a batch of user-agent strings at once.

Why is your website rendered in IE5 (Quirky) Mode?

If you see your Internet Explorer showing that it’s using IE5 (Quirky) mode for a particular website, you might be wondering why?

F12 Developer Mode in IE

As of the date this post has been written, IE11 is the latest version in most of the PCs (Edge is getting popular in Windows 10). So there are IE6, IE7, IE8, IE9, IE10, and IE11 available. Despite several better options, why is your website is rendered in IE5?

  • Via intranet compatibility settings” means that this checkbox is selected in compatibility view settings: “Display intranet sites in Compatibility View
  • This checkbox is selected probably by your IT department
  • If this checkbox is selected and the page doesn’t have HTML5 document tag  (<!DOCTYPE html>), then the browser will render the page in IE5 (Quirks) mode


How to allow European characters in text fields by using regular expression?

You need input validation in your forms to keep your application secure. The best and easiest way to implement input validation is that using regular expressions (regex).

Here is a simple regex to make sure that only English alphabet is allowed in the text field for user’s first name:

<telerik:RadTextBox ID="txtFirstName" runat="server" Font-Size="Medium" Width="200px"></telerik:RadTextBox><span class="mandotaryField" title="Mandotary field"> *</span>
<asp:RegularExpressionValidator ID="regexFirstName" CssClass="ValidationMessage" SetFocusOnError="true" runat="server" Display="Dynamic" ValidationExpression="^[a-zA-Z]$" ControlToValidate="txtFirstName" ErrorMessage="Invalid name format"></asp:RegularExpressionValidator>

What if you want to allow more than English alphabet? Let’s say you have users from Europe so that you need your regex to accept European languages such as German, Italian, Spanish, Portuguese, Danish, Swedish, Irish, Albanian and more.

Use this regex to accept over 70 European (and some African) characters in your text field:


Here are the characters accepted by this regex:


More Information: