Sitecore – WURFL or Sitecore Device Default Detection

Hi all! I return from my long blogging-hibernation. Lately, I encounter a little problem with mobile detection in Sitecore. Before that, yes, I am still working on the website of my company’s client and yes, though I really tired of this Sitecore stuffs, I still feel so curious about it. I hope through this post, you can find the best way to choose for your Sitecore site in detecting device.

As we know, WURFL is a powerful tool that makes your web page suit the device that opens it. We also know that Sitecore is powerful enough to let the developers set a different look and feel for a different device. I thanked so much to my client for they have provided us, the developers a good-customized-WURFL-system. Our client, that is mainly based in the continent far away customized the 51Degree to suit their needs. I don’t want to write how to do such because greater people than me have written about it in their blog (example: the great mentor – at least for me – Alex’s blog.)

Then using the module that our client have made, we can differentiate the site look and feel on various devices. Well, for now, we just differ between mobile, tablet, and our beloved big screen computer. Well, it works just great. Our client make a fine module and I like it! Well, somehow there is a problem, what if the device have a different user agent and that user agent is not registered, yet? Also the update can be automatically done.

In contrast, you know that most of the devices have a common thing in their user agent. Really? What is it? For example, there will be words like “mobile”, “Blackberry”, “Android”, “iP”, etc. You can add the devices and don’t have to write a module like what my client have done. It can detect automatically, and easily. Really? Yes. So, I tried this, too! The result is just great! Fine and really nice. The goodness is that you can detect most of devices easily because they “must have something in common” on their user agent. What’s the disadvantage? If you add a new device, well, be sure to update all of the items in your Sitecore, which can be so many even though you only update the default value of the template.

In the last two paragraphs, it shows like I am telling you that Sitecore default device detection using user agent is a classic way that cost us more effort than using the WURFL way to detect device. Well, I’m afraid I have to say that is true. Since 51Degree offers a free lite package to use, we can just create a module that will need to be updated once or twice for a long time. We don’t have to really create a new device and trouble us with all the task to assign the layouts and sub-layouts to our Sitecore items.

Well, it is up to you to choose. But I am sure there are more things to consider than just what I wrote in here. Be free to comment.

May, 29 2013 update:
For some reason, the device detection system on my local is having problem. Sometimes it works out, sometimes it don’t. I tried to check the values of IsMobile and width (these two rules are those who are used in detecting mobile device in my project). It shows values that match the rule, but somehow it keeps showing the default layout setting from Sitecore. Will update on the way to prevent it.

9 thoughts on “Sitecore – WURFL or Sitecore Device Default Detection

  1. Aditya, Thanks for raising the profile of Sitecore and device detection. Alexander Doroshenko’s latest update to the Mobile Device Detector includes support for (my company) Premium data. This includes properties like IsTablet, IsSmartPhone so that you can easilly distinguish categories of device. It will also automatically update the locally stored database of devices weekly to ensure all the latest devices, useragents and matching logic are included. See the following page for more information.

    Premium data is available for purchase from and starts at $360 per year which is a lot less than many developers will spend on coffee during the same time period. That’s also a lot more cost effective than re-inventing the wheel and maintaining your own solution.

    Regarding device detection via simple strong analysis of the useragent as mentioned in the 4th paragraph. Such approaches give Responsive Design Server Side (RESS) a bad name as they don’t differentiate between device characteristics, just operating systems. To work at 99.9% accuracy as do we need to identify the model and screen size to be able to determine something simple like if the devices is a Tablet or Smartphone. Just knowing it’s Android for example isn’t enough for most use cases.

    Thanks for raising the profile. Happy developing.

    1. Wow, nice update. I will inform my client, if possible. I will also update my post since I have just realize that the update can be automatically done.

      About the detection, I am very sure that there is already a rule that related to screen size in Sitecore’s device. I don’t think you need to update anything and let what have been exist be. Because if you separate the detection for device and screen width, it will give more flexibility when developing.

      For example,

      if Android
      and device width larger than 320px

    2. The screen width property is provided by the free Lite data. However screen width in pixels isn’t enough to work out what the device is now that retina displays are used extensively on high end Smartphones for example. Physical screen size is required which means we need to understand the device model. You can see a full list of properties included with Lite (free) and Premium (paid for) at our web site on the following page.

      The Lite data is 3 months out of date where as the Premium data is updated weekly to include all the latest devices.

      Thanks for passing on to your client.

      BTW – We also have a plug-in for WordPress.

    3. As I see in the properties list, there is already ScreenMMHeight, ScreenMMDiagonal, and ScreenMMWidth. I think that was enough, Sir, to detect the devices and give them the appropriate look and feel.

      But, the risk which might happen one day, is that there may be a physical device that may hit the rules from two different devices in Sitecore. (It is just some kind of paranoia, I am not really put an analysis about this. It is up to anyone to take this paragraph is serious or not.)

  2. Where screen size is important the dimensions in MMs work well. Other properties allow choices to be made based on the supported capabilities of the device. For example; the entire flow of a photo capture web site would change in HTML media capture is supported. Also input method will be important in the future when gesture controlled and voice controlled devices are more common.

    With regard to the rule. I’ll check about the Sitecore implementation. Other implementations we’ve worked on (for example WordPress) allow the rules to be given an order. Only the first matching rule is applied. More soon.

    1. Wow, it means a lot of works to do then if you are going to consider the way of device receiving input. I really haven’t thought that far, Sir. Is there really a way to detect that? I would like to know, too 😀 (since my experience with developing is not that much I think, I am really curious) I have ever develop an application for Android, and there is a way to detect the orientation, camera, signal, etc. Would it be quite the same?

      The rules are okay with orders. Somehow some developers just do not really understand and resulting in not able to distinguish between one device and another. For example he writes a rule for mobile devices and put it on the first priority than in smart phone. So then he is panicked because all smartphone shows a very old look and feel that was designed for old Nokia communicator. As we know that now 51degree have differ them both (isMobile and isSmartPhone), but what if not?

      Just like you said, it is important to know the type of the device. And I really just realize it right now. I really learned a lot today, Sir 😀

      PS. I have gathered quite much information from you till now. Thanks for keep inspiring me and letting my mind open, Sir.

    2. As we track devices down to model we know everything about the hardware including the input methods supported. Any solutions used professionally should be able to do this and achieve very high levels of accuracy. is 99.9% accurate and provides consistent data with a tight well defined meta data dictionary.

      The detection method we use works over HTTP and therefore uses a different set of technologies to native applications. Our focus is optimizing the web rather than native applications.

      If IsSmartphone, IsTablet, etc don’t match then there should always be a catch all template used. Often this will be the existing “big screen” web site.

      Thanks for your blog post and interest in the subject.

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