Update Your WURFL Data (and API): The Oxygen of Device Detection – ScientiaMobile (original) (raw)

Device detection is like oxygen for the mobile internet. It keeps your site, ads, and analytics running smoothly and accurately. But—just like oxygen—your device detection setup can get stale unless you keep it fresh. That’s why we’ve always recommended making regular updates to two key elements of your WURFL-based solution:

Some WURFL users may have a good reason to update the file manually (the most updated XML files are available in the customer vault), but the majority of customers should rely on the built-in WURFL Updater to import new snapshots automatically each week. This way the WURFL snapshot will be downloaded behind the scenes and the in-memory data will be swapped atomically.

Updating the WURFL API Also Matters

While supporting our customers, we realized that many companies are slow at updating their WURFL API. You might be tempted to ignore updating the API itself—after all, it’s easy to focus on just the XML database. But if you skip API updates for months (or years!), you’ll eventually feel the pain:

While you typically don’t have to drop everything and update the moment we release a new version, doing so at least once every quarter or two is highly recommended. It’s surprising how many support tickets we get where the root cause is simply “API too old!”
Also, if updating the API automatically is a requirement, we have a solution for that too – WURFL Microservice will deliver exactly that.

Keeping WURFL’s Snapshot Fresh

Even if your WURFL API is fairly current, the device ecosystem changes constantly. New smartphones, OTT boxes, Smart TVs and IoT devices are released almost every day, plus operating systems and browsers get frequent updates. If your snapshot is more than a few months old, you might be missing out on detection accuracy.

We’ve done internal studies on the “half-life” of device user-agent patterns. If you wait a full year to update, accuracy can plummet to around 38%. That’s why weekly updates are your best bet—particularly if your business or applications depend on precise device or ad targeting.

update XML - accuracy

Built-In Automatic Updates (WURFL Updater)

If you’re using an API version 1.8.0.0 or later, it ships with an integrated WURFL Updater. This is a straightforward way to schedule your updates on a daily, weekly, or monthly basis (example is from Java, but all API versions ship with WURFL updater support).

Note: replace xxxxx with your personal access token

String rootPath = "wurfl.zip"; WURFLEngine engine = new GeneralWURFLEngine(rootPath); // Replace the URL below with your personal WURFL Snapshot download link WURFLUpdater updater = new WURFLUpdater(engine, "https://data.scientiamobile.com/xxxxx/wurfl.zip"); //updater.setFrequency(Frequency.DAILY); // Or WEEKLY // Using the default frequency is probably a good idea updater.performPeriodicUpdate();Code language: Java (java)

The updater checks for new snapshots, downloads them seamlessly, and reloads the engine without interrupting your traffic.

Introducing the WURFL Snapshot Generator

WURFL tracks mobile devices dating all the way back to 1999. Some customers love this feature, but for most users the chances of coming across a Nokia 7110 in the wild are pretty slim. In practice, detecting devices released over the past three or four years still brings their system asymptotically close to 100% device coverage. WURFL’s memory usage is not large, but if for whatever reason conserving memory on the server is a thing, that’s where the Snapshot Generator comes in. The WURFL Snapshot Generator is your personalized tool to grab the most recent WURFL snapshot—built specifically for your license and capabilities—that filters out devices that were released a long time ago. In our own tests, removing devices older than 48 months (4 years) years cut memory usage by over 70% in the Java API. The snapshot generator supports both automated and manual updates.

  1. Found in Your Customer Vault
    Log in to your ScientiaMobile account and navigate to My Products -> View Account -> WURFL Snapshot Generator. You’ll see a private direct download URL (like https://data.scientiamobile.com/xxxxx/wurfl.zip) that’s tied to your license.
  2. Remove Older Devices to Save Memory
    If you don’t care about devices older than a certain age, you can reduce your snapshot size with the remove_older_than parameter. For example:
    https://data.scientiamobile.com/xxxxx/wurfl.zip?remove_older_than=24m That snippet would strip out devices older than 24 months or two years. The device age restriction can be specified in either relative terms (e.g. 24m for 24 months) or in absolute terms (e.g. 2018_march).
    This is a great way to trim memory usage in high-load deployments (barely worth noting: some older devices will still appear in the XML to preserve fallback chains).
  3. Download Methods
    In addition to adopting the WURFL API to set up the updater (as shown above), you can obtain an updated version of the WURFL XML file in other ways:
    • Manual: You can simply click and download the file from your browser (after you have accessed the customer vault), or use your favorite command-line tool (such wget or curl) to download the file.
    • Automated: While we strongly recommend that you use the WURFL updater built into the WURFL API, you can also write a quick script to fetch the snapshot on a schedule, using HTTP If-Modified-Since or HEAD requests so you only grab the file if it’s updated. We also support etag headers, so if you record this value from a response, you can send this identifier back to us in the future using a If-None-Match header, and the snapshot will only be returned for download if the etag is different from yours. This approach is particularly handy if you have custom infrastructure for large-scale deployments.
  4. Weekly Releases (And the Occasional out-of-band Release)
    We typically publish new snapshots every Sunday (EST) to capture the latest devices. Occasionally, if a high-profile device drops mid-week, we’ll do an out-of-band (OOB) release. The Snapshot Generator always serves the newest build, so you can pull it whenever you need it.

In Short… Keep Breathing Fresh Data

Here’s the quick, no-nonsense formula for keeping your device detection healthy:

  1. Stay on a Recent WURFL API Version. Update at least once or twice a year to benefit from performance optimizations, new capabilities, and better detection logic.
  2. Enable Automated Snapshot Updates. Either use the built-in WURFL Updater or set up your own scheduled script to fetch from the Snapshot Generator weekly.
  3. Customize for Memory Footprint. If older devices aren’t relevant to your business, use remove_older_than to lighten your load.
  4. Monitor Your Logs and Accuracy. If you see strange classification rates or if your analytics start looking “off,” it might be time to update.

Need Help?

We’re here for you. Head to your Customer Vault to grab the latest API and snapshots. If you have any issues or questions about enabling the Snapshot Generator, customizing remove_older_than, or scheduling updates, reach out to our Support Team. We’ll help keep you breathing that fresh WURFL data – week after week.

Happy device detecting—and enjoy your fresh oxygen!

Further Reading