How to Simulate Mobile Devices with Device Mode in Chrome


How to Simulate Mobile Devices with Device Mode in Chrome

Website testing has become increasingly complex. The days of checking functionality in a couple of browsers are long gone. Your latest masterpiece must be rigorously evaluated on a range of mobile, tablet and desktop devices with differing OSs, screen resolutions, and capabilities. In extreme cases, it could take as long as the original development.

The process is complicated further by touch-screens, hybrid devices, and high-density displays. If you’re coding on a regular PC with a mouse and keyboard, it’s difficult to appreciate how your masterpiece will operate. Features such as mouse hover won’t necessarily work and your application could be inoperable. But how can you test your system during development and avoid the pain of managing and switching between multiple devices?

Fortunately, all modern browsers offer mobile emulation tools, and one of the best can be found in Chrome. It can help identify early problems without leaving the comfort of your PC and development environment.

Developer Tools

Start Chrome, navigate to the web page you want to test and open the Developer Tools (Menu > Tools > Developer Tools, Cmd + Opt + I on macOS or F12 / Ctrl + Shift + I on Windows and Linux).

You can now enable the browser emulator by clicking the Toggle device toolbar icon in the top left:

enable mobile emulation

A device simulation will now appear:

mobile device emulator

The dimensions of the emulated screen can be changed when Responsive is selected as the device type.

Touch Enabled Emulation

Move your mouse over the device to see a circular “touch” cursor. This will react to touch-based JavaScript events such as touchstart, touchmove and touchend. Mouse-specific events and CSS effects should not occur.

Hold down Shift then click and move your mouse to emulate pinch zooming.

The Mobile Emulator Device Toolbar

It’s worth spending a little time familiarizing yourself with the toolbar and menu above the mobile emulator:

mobile phone simulator device toolbar

The default controls are:

  • the device type (or Responsive)
  • the current resolution
  • the scale (the screen can be zoomed in or out to fit better in the emulator pane)
  • the network speed
  • a portrait/landscape toggle button

The three-dot menu allows you to show or hide additional controls:

  • the device frame (if available, a graphic of the phone or tablet)
  • CSS media query bars (see below)
  • a pixel ruler
  • add device pixel ratios
  • add device types
  • capture a screenshot (including the device frame if shown)
  • capture a full-page screen shot

CSS Media Query Bars

Select Show media queries from the three-dot menu to view a graphical color-coded representation of all media queries set in the CSS.

mobile phone emulator media queries

  • BLUE: queries which target a maximum width
  • GREEN: queries which target widths within a range
  • ORANGE: queries which target a minimum width

Any bar can be clicked to set the emulator screen to that width.

Continue reading
How to Simulate Mobile Devices with Device Mode in Chrome
on SitePoint.

This article was republished from its original source.
Call Us: 1(800)730-2416

Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit

Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)

Powered by

How to Simulate Mobile Devices with Device Mode in Chrome

On-Site Drupal SEO Master Setup

We make sure your site is 100% optimized (and stays that way) for the best SEO results.

With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.

This service includes:

  • Pathauto install and configuration for SEO-friendly URLs.
  • Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
  • Install and fix all issues on the SEO checklist module.
  • Install and configure XML sitemap module and submit sitemaps.
  • Install and configure Google Analytics Module.
  • Install and configure Yoast.
  • Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
  • Install and configure Schema.org Metatag.
  • Configure robots.txt.
  • Google Search Console setup snd configuration.
  • Find & Fix H1 tags.
  • Find and fix duplicate/missing meta descriptions.
  • Find and fix duplicate title tags.
  • Improve title, meta tags, and site descriptions.
  • Optimize images for better search engine optimization. Automate where possible.
  • Find and fix the missing alt and title tag for all images. Automate where possible.
  • The project takes 1 week to complete.