Skip to content

Mobile Optimization Checking

irwink edited this page Jun 16, 2015 · 1 revision

Mobile Optimization

The mobile optimization checking module of the WPSS Validation Tool performs a number of checks to see if web pages are optimized for mobile devices. The Validation Tool uses a profile of test cases to determine which checks to perform and report on.

Mobile Optimization Profiles

The WPSS Validation Tool uses a profile to specify the list of test cases to check and report on. The profiles referred to are:

  • Common - Best practices test cases.
  • None - no mobile optimization checking

A list of test cases is outlined in the following pages.

Common - Best practices test cases

COOKIE_FREE

Description Use Cookie-free Domains for Components
Check For That cookies are not included in HTTP response header for supporting components (e.g. images, CSS, JavaScript)

CSS_LINK

Description Choose <link> over @import
Check For @import directives used to include CSS files.

CSS_TOP

Description Put Stylesheets at the Top
Check For CSS stylesheets that appear in <link> tags in the body of the page.

DNS_LOOKUPS

Description Reduce DNS Lookups
Check For That the number of hosts or servers used to load components (e.g. images, CSS, JavaScript) does not exceed a configurable limit (default 4).

EMPTY_SRC

Description Avoid Empty Image src
Check For <img> tags that have a src attribute with no value (i.e. src=””).

ETAGS

Description Configure ETags
Check For Etags field in HTTP response header for supporting files (e.g. images, CSS, JavaScript).

EXPIRES

Description Add an Expires or a Cache-Control Header
Check For Expires or Cache-Control field in HTTP response header for supporting files (e.g. images, CSS, JavaScript).

EXTERNAL

Description Make JavaScript and CSS External
Check For That the number of characters of inline JavaScript or CSS in a web page does not exceed an acceptable limit (default 2000 and 500 characters).

FAVICON

Description Make favicon.ico Small and Cacheable
Check For That if no favicon is specified, the default /favicon.ico is available on the web server. That the favicon image size does not exceed an acceptable size (in bytes). That the favicon image has expires or cache-control headers in the HTTP response.

GZIP

Description Compress Components
Check For The text based content (e.g. HTML, CSS, JavaScript) is compressed in the HTTP response.

IFRAMES

Description Minimize the Number of iframes
Check For That the number of iframes does not exceed an acceptable number (default 1).

JS_BOTTOM

Description Put Scripts at the Bottom
Check For That JavaScript files are not loaded in the <head> section. That JavaScript files are loaded near the bottom of the page. Excludes JavaScript loaded in conditional content for older versions of Internet Explorer.

JS_DUPES

Description Remove Duplicate Scripts
Check For That a JavaScript file is not loaded more once on the page.

MINIFY

Description Minify JavaScript and CSS
Check For That the number of whitespace (space, tab or newline) characters does not exceed an acceptable maximum (default 5% of total). That the number of comment characters does not exceed an acceptable maximum (default 10% of total).

NO_404

Description No 404s
Check For That there are no broken links on the web page.

NO_SCALE

Description Don't Scale Images in HTML
Check For HTML <img> tags with height and width attributes used to scale down images. That scaling does not exceed an acceptable maximum (default 10%).

NUM_HTTP

Description Minimize HTTP Requests
Check For That the number of CSS files loaded in <link> tags does not exceed and acceptable maximum (default 5). That the number of JavaScript files loaded in <script> tags does not exceed and acceptable maximum (default 5). That the number of image files loaded does not exceed and acceptable maximum (default 12).

OPT_IMAGES

Description Optimize Images
Check For That image files are optimized and cannot be either stripped of properties, colour tables reduced or have it’s data compressed. Tools used for analysis include jpegoptim or opting.

REDIRECTS

Description Avoid Redirects
Check For That links on the page are not redirected.