16
votes

To implement mobile website it would be useful to set max-device-width in my browser. I know plugins to fake the user-agent. It this also possible for the max-device-width? I would prefer to use a regular browser like Firefox, IE, Opera, ... instead of all kind of mobile browser emulators or even different smartphones.

Thanks, Ropo

2

2 Answers

15
votes

Chrome allows you to set device metrics, which are used in the media queries calculation for device width. To do that, open Developer Tools, click the gear icon on the lower right corner, and go to the Overrides tab.

Edit Jan. 17, 2014: Chrome now has an Emulation tab, that can be found alongside Console, in Developer Tools.

5
votes

In the common case desktop browsers can be used for sanity checks of html & css, but mobile browsers are very different in the html, css and javascript processing.

To "emulate" max-device-width you can replace max-device-width with max-width and resize your browser window to required size (actual versions of browsers supports max-width media-query instruction).

We use desktop browsers at the early stages of mobile web interface development and emulators in late. UI testers use real devices only.