Giter Site home page Giter Site logo

varnish-devicedetect's Issues

FirefoxOS detection

Hi,

Could you please add FirefoxOS to list of mobile devices.

According to Mozilla, User-Agent is:

  Mozilla/5.0 (Mobile; rv:15.0) Gecko/15.0 Firefox/15.0

Please, avoid confusion with Firefox for Android:

  Mozilla/5.0 (Android; Mobile; rv:15.0) Gecko/15.0 Firefox/15.0

Thank you very much.

Tablet PC in varnish-device detect

I compared varnish-device detect method with UA Parser and I noticed that varnish method not detected Tablet PC devices as a mobile (where regexp_like(useragent, '(Tablet._PC|PC._Tablet)', 'i')).

I uploaded sample of user agents on the gist:
https://gist.github.com/pongacm/b7775bebf2b26c09e1f8

Wikipedia says that tablet PC is a tablet:
http://en.wikipedia.org/wiki/Microsoft_Tablet_PC

I'm analyst so I can't prepare pull request. Is any chance to improve varnish-device detect by somone with you?

Microsoft Surface handling

I wrote this on a comment on the commit 17c109a but it might be better to do it here:

This pattern is not correct. The second [] should be ().
The architecture is only valid on IE 10 under Windows 8 or later.

This needs to be studied a bit further but I don't think this change is correct.

Licence?

Hi,

I'm about to use this code at my company. Could you specify a licence under which we can use it?

Thanks.

iOS User-Agent used in OS process retrieving icons for “Add To Home Screen” not recognized as a mobile device.

I just stumbled upon a piece of weird behaviour in the latest iOS release.

We are using varnish to redirect specific urls when accessing them with a smartphone. This works perfectly except when using the iOS “Add to Home Screen” option for bookmarking pages as icons on the app home screen. The bookmark works as expected, but the icon for the app (a link to which is defined in the source of the bookmarked html page) does not.

Safari “correctly” identifies itself using this User-Agent header:

Mozilla/5.0 (iPhone; CPU iPhone OS 7_1 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D167 Safari/9537.53

Which is caught by the Varnish devicedetect rule just fine, but when inspecting the requests coming out of the iPhone upon using “Add to Home Screen” the User-Agent header for the requests for the icons was:

MobileSafari/9537.53 CFNetwork/672.1.13 Darwin/13.1.0

Probably because the requests for the icons are handled by the OS rather than Safari (my guess), but the effect is that this evades the devicedetect rule altogether and causes the requests for the icons to 404.

Performance Benchmark?

Greetings,

I really want to try this out. I have a Symfony app running behind Varnish and the performance is really good, but as always, it can be be better.

All requests must reach the app then, depending on certain parameters, a specific response is generated. I cache db heavy fragments of the page using ESI. One of those parameters is Device detection. I currently use https://github.com/serbanghita/Mobile-Detect.

I have been profiling my app and the response times for the home page is 179ms, a whooping 125ms of which is for device detection.

I am curious to the performance of mobile detection using Varnish, has anyone ever benchmarked it out? Of course, written in C should make it really fast but how much? I know the best way is to profile myself but you see, it will mean changing my app code entirely which will take days, I was wondering if anyone had rough estimates/ideas.

Regards.

new google mobile-bot

Hi,
according to this page:
https://support.google.com/webmasters/answer/1061943
google has a new mobile bot, maybe (as per our analysis) since April 19th

In order to catch it, I've made a little change in the vcl, this one:

43c43

< (req.http.User-Agent ~ "iPhone" && req.http.User-Agent ~ "(compatible; Googlebot/2.1; +http://www.google.com/bot.html")) {

        (req.http.User-Agent ~ "(iPhone|Android)" && req.http.User-Agent ~ "\(compatible; Googlebot/2.1; \+http://www.google.com/bot.html")) {

let me know if you need a pull request

thanks,
corrado

Need to differentiate between mobile bot and desktop bot

Right now all bots are grouped together into a single X-UA-Device of 'bot'. But Google, for example, has bots that are specifically used for crawling mobile sites. See:

https://developers.google.com/webmasters/smartphone-sites/googlebot-mobile
http://googlewebmastercentral.blogspot.com/2014/01/a-new-googlebot-user-agent-for-crawling.html

I'm not sure of whether there are other "mobile bot" user agents, but it might make sense to have a 'mobile-bot' X-UA-Device.

Wrong X-UA-Device

Hi, we're using this VCL and we get wrong detections in several computers.
Sometimes it detects chrome on windows as smartphone and sometimes it detects android chrome as a desktop.
Is this a known issue or something went wrong with the implementation?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.