How to test responsive design for free. Responsive layout using JavaScript script Testing responsive design

Hello, dear blog readers. It’s not surprising that adaptive design is becoming more and more popular on the Russian Internet. And of course, layout designers need to study it. Since responsive design will soon be on almost all websites, because more and more people are using mobile devices.

And I would like to say that sites with it are much more convenient to read on such devices than without it.

Today I want to introduce you to 5 very useful and cool services with which you can check your website for adaptability.

And so, let's go.

5 services where you can check your website for adaptability. www.responsivedesigntest.net

A good service for checking sites. There are many screen resolutions for both tablets and phones.

mattkersley.com

A simple service for checking a website from Matt Kersley. All popular mobile device resolutions are also available.

screenqueri.es

A very cool service that will check any site. I really liked the design, as well as the functionality.

quirktools.com

Very beautiful and functional service. It is even possible to check how the site will look on TV :-)

From the author: “Stop resizing this browser, it will soon be erased!” How often do you hear this? Well, okay, maybe not that often, but if you develop responsive websites, you know what I'm talking about: every time you edit the DOM or CSS, you're dragging the edge of the browser back and forth, testing the changes and looking for inaccuracies.

In general, most of these efforts are an attempt to mimic the screen sizes of different devices.

If you're doing enterprise development, you probably have a lot of company-provided devices to test. Where I work, we have iPads, iPhones, one or two other tablets, laptops and desktops. If you don't have that luxury, you have to use what you have at hand.

At home I have two different laptops, two different Android devices: Kindle and Nexus 7. I use these devices to test my freelance developments, but it is clear that this is not an exhaustive selection. Not at all iOS devices, and while I'm considered an early adopter, I don't plan on buying every new phone/tablet/tablet as soon as it goes on sale.

So what should a developer do? Fortunately, there are a growing number of browser-based tools that simulate the screen sizes of a variety of devices. Different tools, of course, come with different sets of features and different levels of efficiency. We will look at some of them here.

For testing purposes, I took the first truly responsive website I created, PajamasOnYourFeet.com. It is based on the Brownie HTML5 template, very generously and freely provided to the developer community on EGrappler.

Am I responsive?

Am I responsive? – a completely easy, instant preview of your site in terms of how it will appear on four different devices. All four are iOS, and the developer explains his choice on the website. It doesn't offer any controls or selections, just a very simple and elegant display. View window dimensions:

Desktop - 1600 x 992px, decreasing by scale (0.3181)

Laptop - 1280 x 802px, decreasing in scale (0.277)

Tablet - 768 x 1024px, decreasing by scale (0.219)

Mobile - 320 x 480px, decreasing by scale (0.219)

To quote the developer: “This is not a testing tool, it is very important to do this on real devices. But it is a tool for taking quick screenshots (for me) and providing a visual opportunity to “drill down” in client meetings what you meant.”

device positive

deviceponsive is similar to the Am I Responsive site? one that displays your site simply and neatly, but has no controls or available options when it comes to devices. All of them are shown simultaneously on one long page. It has an interesting property - you can modify the header by editing its background color and inserting your own logo, and then “print it”. This way, in a sense, you can brand your site when showing screenshots to the client. Devices and screen sizes simulated on this site:

Macbook - 1280 x 800

iPad (portrait) - 768 x 1024

iPad (landscape) - 1024 x 768

Kindle (portrait) - 600 x 1024

Kindle (landscape) - 1024 x 600

iPhone (portrait orientation) - 320 x 480

iPhone (landscape) - 480 x 320

Galaxy (portrait) - 240 x 320

Galaxy(landscape) - 320 x 240

As with most similar tools, scroll bars appear on small devices. They won't show up on a real device, but to be able to scroll the test view on a non-touch device you have to make some concessions.

responsive test

Like deviceponsive, responsive test displays your site on multiple devices, but instead of showing them all at once on one page, you choose which device to view from a simple menu at the top of the page. Browsing this site on a medium-sized laptop, I found that shrinking the page works great, allowing you to see the entire site inside the window of the device under test.

Thirteen different viewing windows are offered here, from a large monitor desktop computer to the so-called “Crappy Android” (to be honest, they also have an option called “ Android is better"(Nicer Android).

Once again, Firefox stumbles a bit on this site. Notice in the screenshot - between the green header and the content area with a white background - there is only a blue bar where the image slider should appear.

responsive.is

It's very similar to the previous two, and the only thing that sets responsive.is apart from them is the smooth animation of the display from one device to the next, as well as a translucent overlay showing the site's real estate falling out of the viewport.

The only available device options here are automatic ones, which fill your browser window, showing the site as you would see it if you went to it: Desktop; Tablet (landscape orientation); Tablet (portrait orientation); Smartphone (landscape orientation) and Smartphone (portrait orientation), pixel dimensions are not given.

Screenqueries

Once again, several different features and options set Screenqueries apart from other sites. There are 14 phone and 12 tablet devices with a separate element for switching portrait and landscape modes. These are displayed on a numbered pixel grid, with the dimensions shown at the bottom right of the test display. The edges of the display are draggable so you can test custom sizes. Drag or click over the testing area and the background will turn gray, with a less cluttered appearance.

Interesting feature this site - for several devices there is a “True view” option, which shows your site wrapped in the chrome browser assigned to this device. Unfortunately, and I'm already used to this, Firefox is unable to display the image slider of the test site. Don't worry, I really prefer Firefox when it comes to browsers, but luckily we have options.

Screenfly

Screenfly really increases the usability factor. It offers nine devices larger than tablets, from a 10-inch laptop to a 24-inch desktop, five tablets, nine smartphones, three TV sizes and a custom screen size option. Any option you select can be rotated in portrait or landscape orientation using a separate control in the menu. You can choose whether to allow scrolling or not and generate a shareable link with one click of a button.

The site is proactively useful in the way it presents pixel sizing information. Each device in the menu is shown with a name and pixel dimensions, the size of your own browser window is shown near the top right corner of the window, and the dimensions of the selected option are shown in the footer below the display along with the URL of the site being tested. This small feature makes it easier to document screenshots and share information with clients.

All of the above would have already made it an ideal tool, but the Screenfly developers found an opportunity to make it simply top class and provided a proxy server property. Quoting from their website: “Screenfly may use a proxy server to impersonate devices while you view their website. The proxy simulates the user agent string of the devices you select, but not the behavior of those devices." All other tools covered here deal exclusively with CSS. Screenfly is the only one that allows testing based on the user agent string.

Having tested in this way one site I created with the existing mobile version, I can say that the results were very good. Everything displayed exactly as I expected and the features were testable. It must be said that testing user agent strings has become traditional, but this site was made a long time ago, and the proxy property turned out to be a very useful addition to it indeed.

Conclusion

So, you can see that there are plenty of resources available for testing responsive websites. They differ in unique properties; which sites you use will depend on your personal preferences and requirements, and I try to encourage you to explore and experiment with them. The more we developers have truly useful tools, all the better.

An online store needs to be optimized for mobile devices. This problem is solved using adaptive design, which allows the site to be displayed correctly on any platform. However, implementing responsive design comes with a standard set of pitfalls. Let's list the 8 most common problems typical for online shopping sites.

Neglecting visitor behavior analytics

The rush to enter the mobile segment forces retailers to design a website without conducting serious analytics of visitor behavior. Analysis of visitor behavior is the most important stage of preparation, which allows you to identify the most popular mobile devices and optimize the site for them first. Analytics helps determine the most “popular” user action, for example, enlarging a product image; shows the conversion rate of mobile visitors, etc. This data will provide insight into user behavior preferences and help meet the expectations of the mobile audience. Analysis mobile traffic it is necessary to carry out systematically and consistently implement the results, finalizing and optimizing the site to meet the needs of customers.

Designing a Desktop Store

Typically, the desktop version of an online store is redesigned for mobile screens, although it is more logical to take the small screen of a mobile device and then scale it to the desktop. Retailers often do not realize the technical problems of bringing a website designed for a desktop to the size of a smartphone.
Starting design for mobile screens, you focus on the mobile user experience. As a result, it will be easier for you to design for both channels: desktop and mobile.

Testing responsive design

Testing the mobile layout of an online store is a mandatory stage of launch, but many owners often neglect it and launch without testing. As a result, on the live version of the site for mobile devices, errors can appear even during the process of making a purchase and placing an order.

The shortcomings of adaptive design are easily identified by preliminary testing of an online store, but many sellers do not have the resources for this. To reduce the risk of losing money, test key user routes around the site in the main browsers - Chrome, IE, Firefox, Safari and operating systems– Windows, Mac OS, Android, IOS on popular mobile devices. Test every time you make changes; services like BrowserStack or Viewport Resizer can help reduce testing time to several hours.

Small elements for mobile screens

In an effort to fit more space on a smartphone screen, online store owners skimp on the size of their “call to action” buttons. Don't force users to zoom to click the Buy button and don't place small elements too close together, otherwise your users will choose to go to a more convenient site. Design interfaces with large navigation elements and call-to-action button sizes.

Slow page loading speed

Mobile audiences love fast sites and minimal loading times. Evaluate the components of your mobile pages– pictures, buttons, text, scripts – they must be optimized for mobile devices. Google takes page load time into account in its SERPs and ranks mobile sites and gives them preference in the top, so that “light” sites get an additional serious advantage.

Separate content into different tabs, for example, a product page may contain only a basic image, description, price and a “Buy” button. Customer reviews and videos can be placed on a separate tab and reduce the “weight” of the main part of the page. In addition to content, optimize other elements that affect loading speed - CSS files, images and scripts, send only the necessary data. Tools that reduce the size of resource files and their loading time will help you with this: Uglify or JSCompress.

Trimming content for mobile users

Often, developers hide some of the content so that loading on mobile devices is faster. However, often the page size is not actually reduced and the content is simply not displayed to the user. Your store should be able to dynamically generate a page, reducing page weight and loading times for mobile visitors. Additionally, giving mobile users less content is bad and negatively impacts the consumer experience. Typically, during the purchasing process they use different devices, about 90% of online shoppers do this. Limiting them to responsive design methods is a big mistake.

Supports images in only one resolution

A good website with a responsive design automatically changes the resolution of images depending on the type of device; heavy images increase loading time. There are several ways to automatically adjust image sizes to fit specific device. “Flexible” images (fluid images) are a CSS-based method that allows you to compress and stretch an image depending on the width of the element containing it, or an HTML5 element that allows you to load an image of the required size for each type of device.

"Non-responsive" emails

It happens that everything is fine with the site itself; responsive design works well on desktops and mobile devices. But emails aren't responsive, and mobile users have to struggle to check order details or scroll through an endless list of recommended products to get to their completed purchases. Emails are a key customer touchpoint, so integrate responsive email design into your mobile strategy. Design and test your letters and newsletters; letter templates should be “lightweight” and contain only important information.

With the development of web technologies, the requirements for web development also increase. Web developers, layout designers, or as they are called today frontend developers, feel the most pressure.

In this article we will talk a little about adaptive layout, since this “trick” is now very expensive. When it comes to adaptive layout, layout designers of any level look at customers or project managers, to put it mildly, with anger, because they understand how difficult it is.

Many people begin to confuse adaptive layout with flexible layout; this is a very common mistake of novice layout designers. What's the difference you ask?

Let’s first, so that it’s clear to you and so to speak, put all the dots and look at what types of layout there are.

There are 4 types of layout:

  • Fixed layout
  • Rubber layout
  • Adaptive layout
  • Responsive layout
  • Let's consider all types in more detail.

    1. Fixed layout

    Blocks do not change their width. On low-resolution monitors, a horizontal scroll bar appears.

    #temnyi, #svetlyi ( width: 440px; )

    2. Rubber layout

    The blocks change their width depending on the size of the browser window. It can take maximum and minimum values ​​(max-width property). But you can’t make 50% from 50% to 100% as the screen gets smaller.

    #temnyi, #svetlyi ( width: 50%; )

    3. Adaptive layout

    Implemented using @media or scripts. Customized for specific known devices (320, 768, 1024, etc.). Any change occurs in jerks, after reaching one of the specified levels. Definitely suitable for

    #temnyi, #svetlyi ( width: 430px; ) @media (max-width: 1220px) ( #temnyi, #svetlyi ( width: 380px; ) ) @media (max-width: 1120px) ( #temnyi, #svetlyi ( width : 325px; ) ) @media (max-width: 680px) ( #temnyi, #svetlyi ( width: 200px; ) )

    4. Responsive layout

    This is a combination of fluid and adaptive layout. The most difficult to implement. But the result is the most acceptable. It's safe to say that the site will adapt to any device.

    #temnyi, #svetlyi ( width: 50%; ) @media (max-width: 1006px) ( #temnyi, #svetlyi ( width: 100%; ) )

    So we talked about 4 types of website layout. Now the time has come for our miracle adaptive layout script. I hope I don’t need to explain anything, the script is quite simple, we’re just saying that when you change some block will be mixed somewhere and that’s it. Of course, this is also possible through CSS styles, but you need to know all the methods; sometimes in some places some will not work and some will be just right.

    Adaptive layout script:

    /* Let's create a variable into which you can put monogest classes, for convenient use of them in code. That is, here it detects them once and that’s it, and not before each sample! this is a useful feature */ var my = ( window: $(window) ); /*Actually the function itself*/ $(window).resize(function () ( /*A ​​variable that determines the width of the window and puts it in the width variable*/ var width = my.window.width(); /*window transformation condition i.e. a condition that is executed when the window width reaches a certain size */ if(my.window.width()< 640) { $(".right-content").css("float:none; clear:both"); $(".header-menu").css("float","left"); if(width < 480) { /*какое нибудь условие*/ if(width < 320) { /*какое нибудь условие*/ } } } /*Возвращает все стили на свои места т.е при расширении он примет первоначальный вид*/ else { $(".right-content").css("float:left; clear:none"); $(".header-menu").css("float:none") } });

    That's all. If you have any questions, write in the comments, go to



    
    Top