WHAT IS TEXTGLASS?

TextGlass is a text classification project. This encompasses things like device, browser, OS detection, and even WAF rules. Give TextGlass a string (like a HTTP User-Agent request header) and it will tell you what it is.

TextGlass has extended the idea of classification into generic JSON domains. The domain tells the TextGlass client how to classify the input into a result. This will allow this project and 3rd parties to create their own domains and use them with standard TextGlass clients. This also allows you to a run a domain across a large variety of languages and platforms and achieve identical results.

TextGlass has client support for the following languages:

Javascript, C, and Java

TextGlass supports the following platforms:

Varnish Cache

We are looking to expand our language and platform offering, so reach out if you would like to help.

TextGlass provides the following domains:

Device, Browser, and OS

For more information, please scroll down to the FAQ section.

WHY TEXTGLASS?

Too many flawed browser, OS, and device detection algorithms. Most are a jumble of regex and if statements. Also, the quality, accuracy, and consistency can vary greatly between languages and implementations. TextGlass is an attempt at a better detection library. Code and pattern data are cleanly seperated and a specification exists so that results are identical regardless of language or platform. Also, the pattern rules allow for any unique text to be identified with a simple definition.

DEMO

Loading...

CodePen example

LINKS

Github project home
Domain specification
Performance
Releases
Contact

DOWNLOAD:
Download TextGlass

DOMAINS:
Device domain [Download]
Browser domain [Download]
OS domain [Download]

CLIENTS:
Reference client [Download]
C client [Download]
Javascript client [Demo] [Download]
Java client [Download]

PLATFORMS:
Varnish Cache

LICENSE:
Apache License 2.0

FAQ