title: Determine if a site is responsive on mobile using JavaScript
body: <p><strong>What are the best ways to determine if a site is responsive or not using JavaScript?</strong> </p>
  
  <p><a href="https://stackoverflow.com/questions/20717056/how-to-use-javascript-to-detect-whether-a-web-page-is-responsive-on-mobile">This answer</a> details checking for <code>@media</code> queries, which is somewhat accurate. However checking <code>@media</code> queries may not always work because:</p>
  
  <p>a) A responsive site doesn't necessarily need media queries (e.g. they may sniff the user agent and produce different HTML based on it)</p>
  
  <p>b) The media query might only influence a small part of the page (e.g. the footer)</p>
  
  <p>Maybe comparing HTML from different user agents would give a good indication also? Or checking the size of the media query content (e.g. if it's large, it might effect a large part of the page).</p>