Skip to content

Instantly share code, notes, and snippets.

@mems
Last active December 8, 2021 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mems/c84f5724420e467e1699f7ff5a4632eb to your computer and use it in GitHub Desktop.
Save mems/c84f5724420e467e1699f7ff5a4632eb to your computer and use it in GitHub Desktop.
Web Lint

Optimization advices, other lint rules:

Other

Meta and links tags

Must check other/extra attributes that could be unused on meta (other than charset|http-equiv|name|itemprop, content) or link -> an other lint rule? Each rules must have a specificity

Others:

Could be obselete (non standard):

  • <meta name="apple-mobile-web-app-status-bar-style" content="black">: Sets the style of the status bar for a web application. Supported Meta Tags
  • <meta name="format-detection" content="telephone=no">: Enables or disables automatic detection of possible phone numbers in a webpage in Safari on iOS. Supported Meta Tags
  • <link rel="apple-touch-icon" href="touch-icon-iphone.png">: Specifying a Webpage Icon for Web Clip Configuring Web Applications
  • <link rel="apple-touch-startup-image" href="/launch.png">: Specifying a Launch Screen Image Configuring Web Applications
  • <meta name="apple-mobile-web-app-title" content="AppTitle">: Adding a Launch Icon Title Configuring Web Applications
  • <meta name="apple-mobile-web-app-capable" content="yes">: Hiding Safari User Interface Components Configuring Web Applications
  • <meta name="apple-mobile-web-app-status-bar-style" content="black">: Changing the Status Bar Appearance Configuring Web Applications
  • <meta name="mobile-web-app-capable" content="yes">: Add to Homescreen - Google Chrome
  • <link rel="alternate" href="https://feeds.feedburner.com/example" type="application/rss+xml" title="RSS">
  • <link rel="alternate" href="https://example.com/feed.atom" type="application/atom+xml" title="Atom 0.3">
  • <link rel="amphtml" href="https://example.com/path/to/amp-version.html">
  • <meta name="google" content="nositelinkssearchbox">: Disables the sitelinks search box in Google
  • <meta name="google" content="notranslate">: Prevents Google Chrome from translating the webpage into other languages.
  • <meta name="thumbnail" content="http://example/foo.jpg">: Page thumbail in search result of Google Custom Search Specify thumbnails - Custom Search Help
  • <meta http-equiv="x-dns-prefetch-control" content="off">: X-DNS-Prefetch-Control - HTTP | MDN

Microformats

Use to identify the website (by Search Engines, Ad networks, etc.), consider other solutions (DNS TXT record, DNS CNAME record, host a specific file like .well-known, etc.):

Obselete, unknown:

Type recommendations

Avergage scores for each recommandations (from gtmetrix for pagespeed and yslow) https://gtmetrix.com/recommendations.html :

  • Minimize redirects: 86%
  • Leverage browser caching: 60%
  • Serve resources from a consistent URL: 88%
  • Combine images using CSS sprites: 89%
  • Minimize request size: 97%
  • Enable Keep-Alive: 95%
  • Defer parsing of JavaScript: 70%
  • Minify JavaScript: 89%
  • Specify a cache validator: 94%
  • Specify image dimensions: 98%
  • Optimize images: 69%
  • Minify HTML: 98%
  • Enable gzip compression: 84%
  • Specify a character set early: 100%
  • Minify CSS: 95%
  • Remove query strings from static resources: 89%
  • Specify a Vary: Accept-Encoding header: 96%
  • Avoid bad requests: 97%
  • Avoid a character set in the meta tag: 100%
  • Avoid landing page redirects: 98%
  • Inline small CSS: 96%
  • Inline small JavaScript: 94%
  • Optimize the order of styles and scripts: 94%
  • Put CSS in the document head: 100%
  • Serve scaled images: 74%
  • Avoid CSS @import: 98%
  • Prefer asynchronous resources: 100%
  • Add Expires headers: 25%
  • Make fewer HTTP requests: 33%
  • Use a Content Delivery Network (CDN): 18%
  • Avoid URL redirects: 86%
  • Reduce the number of DOM elements: 92%
  • Use cookie-free domains: 47%
  • Reduce DNS lookups: 69%
  • Minify JavaScript and CSS: 72%
  • Configure entity tags (ETags): 89%
  • Compress components with gzip: 84%
  • Make AJAX cacheable: 100%
  • Remove duplicate JavaScript and CSS: 100%
  • Avoid AlphaImageLoader filter: 99%
  • Avoid HTTP 404 (Not Found) error: 98%
  • Use GET for AJAX requests: 100%
  • Avoid CSS expressions: 98%
  • Reduce cookie size: 100%
  • Make favicon small and cacheable: 100%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment