Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
September 28, 2021 04:58 pm GMT

How to Emulate Devices on Google Chrome

When building websites, you have to keep in mind that many kinds of device are going to be viewing your site. These devices will come with different screen orientations.

Thus, making your website look good on mobile, tablets and desktop is vital.

You dont need to use third party tools to test your website. Google Chrome comes with an in-built device simulator. You can select any of the devices and view how your page will look on that device. You can even add custom devices which are not included in the list.

Simulate a device on Chrome

Open the Chrome DevTool. You can do this by clicking on F12.

Alternatively, you can click on the three dots on the top right corner of your broswer window, select more tools and then developer tools.

Next, toggle the device view by click on the devices icon next to the elements tab.

Toggle device

Your page will be rendered into device mode. You will also notice the dropdown menu on top. From this drop down menu, you can select the device you want to emulate and view how you page will look on it.

The list of devices on the dropdown is limited. You can also edit the list to select and add other devices to the drop-down.

Adding custom devices

You can also create and add custom devices. To do so, click on the custom devices button.

Add devices

You will need to input the height and width of your target device, as well as its pixel density.

You can find the screen resolution of any mobile device at this website .

You will also need to add a user agent string. A user agent string is a string of containing information about the computer requesting a web page.

This website has the user agent string for all common devices .

Finally you can add the device.

preview.png

Now you will be able to emulate that device and test your web page on it.

Wrapping up

Device emulators are very good for responsive design. It's important to note that simulation in this case is just the visual part. The web browser does not run the operating system.

Don't forget to sign up for my newsletter!


Original Link: https://dev.to/ubahthebuilder/how-to-emulate-devices-on-google-chrome-ad5

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To