django-wurfl icon indicating copy to clipboard operation
django-wurfl copied to clipboard

Making partial user agent matching more flexible

Open vijaykramesh opened this issue 13 years ago • 2 comments

adding BaseDevice._match_partial_user_agent to have flexible prefix matching from 1/3rd to 1/10th of the original user-agent strinh

helps alleviate the issue raised by https://github.com/clement/django-wurfl/issues/4, although django-wurfl still doesn't have the robust type-specific partial matching that the official wurfl apis (eg, tera-wurfl) do.

vijaykramesh avatar Jun 21 '11 14:06 vijaykramesh

I wasn't getting detection for my iPhone4 through Django-wurfl so I tried this patch. It does work for the iPhone4, however it also works for Firefox 9 on my desktop. Eeek! I think by the time it get's up to 1/10th the UA string, we'll be seeing a lot of false positives.

rbdcti avatar Jan 10 '12 22:01 rbdcti

Even using 1/4 of the UA string leads to false positives, as it thinks that IE (or Firefox...one of them) is Windows CE, for instance.

However, using the 1/3 of the UA doesn't catch my iPhone4 running IOS 5.0.1 (5.0 is in the wurfl, but 5.0.1 isn't yet).

In any case, we'll need a better approach than simple prefix matching in the end it seems unfortunately.

rbdcti avatar Jan 11 '12 03:01 rbdcti