Live data from Hacker News

Is Google Burying Firefox With User Agent Strings?

thepowerbase.com

71–72 of 72 posts

Re: Is Google Burying Firefox With User Agent Strings?

#71
post #21

AFAIK, the chrome user agent switcher extension only changes the agent on a JS level. You can't change what is being sent to the server due to limitations in the extension API. This explains the Adsense warning because the server-side part of the framework used (gwt) is seeing a different user agent than what the client part is seeing. Granted, UA sniffing is bad practice on either client or server side, but if you d…

Having used GWT in the past, the GWT error makes sense. When loading a GWT application, GWT first sniffs the user agent and locale. It then downloads a different javascript file, optimized for the given user agent and locale.

For example, the javascript file served to a French user using Firefox will contain only French labels, and won't contain any code to deal with IE, Chrome...

User agent sniffing is not always good practice, but, in this case, it results in a nice performance improvement :) You can even use it to have a "production" and a "debug" version of your app. By adding "?debug=true" to your URL, GWT would load the "debug" version, which could for example contain code to log information.

https://developers.google.com/web-toolkit/doc/latest/FAQ_Deb...

Post reply on HN