rguerreiro / device

Device type detection library based on the useragent string. Refactored from my express-device repo.
MIT License
79 stars 27 forks source link

Googlebot on smartphone classified as "phone" instead of "bot" #6

Closed rguerreiro closed 8 years ago

rguerreiro commented 8 years ago

@macinjosh32 submitted the following issue on express-device repo:

I'm seeing the following user agents being detected as "phone":

Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/537.36 (KHTML, like Gecko) Version/8.0 Mobile/12F70 Safari/600.1.4 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)

Mozilla/5.0 (iPhone; CPU iPhone OS 83 like Mac OS X) AppleWebKit/600.1.4 (KHTML like Gecko) Version/8.0 Mobile/12F70 Safari/600.1.4 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)

More complete list here: https://support.google.com/webmasters/answer/1061943?hl=en

Seems to me they should be categorized as "bot" to be consistent with the fact bot-ness trumps device type for desktop. What do you think?

martincad commented 8 years ago

Same here :(

rguerreiro commented 8 years ago

Sorry for the delay guys. It's all good now. Going to publish it right now as v0.3.4

martincad commented 8 years ago

Thanks for the fix. Even though the fix is useful, I think in the long run the device type needs to be separated from the isBot attribute, so it would be great to be able to know the device type independently if its bot or not.

rguerreiro commented 8 years ago

That's an idea. Let me think it thru...

Meanwhile, could you please open an issue for it, for keeping track?