Setting viewport size with WebPagetest

One of the pitfalls of responsive web design is that it’s easy to create mobile sites that are simplified for small screens and touch interaction but aren’t any lighter on bandwidth and memory than their full-size relatives.

There’s an undocumented option in WebPagetest to check page loads at arbitrary viewport sizes.

From slide 50 of the same slide deck I mentioned in my last post:

Run webpagetest script with resizing

  • Use Chrome as agent (not supported on other browsers)
  • Sample script (tab delimited):
    setviewportsize   320  480
    navigate http://example.com/