I have a site optimized for mobile devices that uses a fairly simple trick to serve another page based on browser width. This worked fine until a Droid appeared with a screen with a very high pixel density.
I understand that the default setting on the screen is 800 pixels wide (much wider than my definition of the width of the script, which decides which page will be displayed at 500 pixels). However, the Droid browser seems to arbitrarily decide to report a smaller width and, therefore, serve a page of a smaller width. But not in a predictable homestead.
As a result, the experience for the end user is completely random: sometimes they see a wide page on which they have to zoom in, sometimes they see a page that scales directly to their window.
I wrote a small script that reports the width of the screen, and even when I force the viewport to a specific pixel size, I have some users still reporting a width of 800 pixels (even in vertical orientation), while others report a fixed width.
Is there a way to permanently set the width for the Droid browser? This is mistake? Am I just not thinking anything? Honestly, it is starting to feel like projecting in a dark cave with my hands tied behind my back.
source
share