title: Modernizr with Respond.js
body: <p>I am carefully assessing the best way to utilize <a href="http://www.modernizr.com/">Modernizr</a> and <a href="https://github.com/scottjehl/Respond#readme">Respond.js</a> for responsive design and have a couple of questions for the community.</p>
  
  <p>Firstly, it is my understanding that when bundling Modernizr with Respond.js, no other coding or tests are required for media query support in IE8 and below. In other words, when Respond.js is bundled with Modernizr I merely have to load Modernizr in my source to get Respond.js active. Correct?</p>
  
  <p>Secondly, do you believe this is the most efficient way to achieve support for media queries in IE8 and below? In essence, I would be including a larger Modernizr script than is needed for browsers that already support media queries. Wouldn't it be more efficient to separate the two scripts and only load Respond.js if a test for media queries fails?</p>
  
  <p>Third, if I would like to separate the two scripts, what do you believe is the best way to load Respond.js if needed? One option would be to use an IE specific conditional comment to load Respond. Another option is to use yepnope and Modernizr to test for media query support and load Respond if needed. Which would be more efficient and fault-proof.</p>
  
  <p>Lastly, if I choose to separate the two scripts and use Modernizr to load Respond if needed I have encountered the two following techniques:</p>
  
  <pre><code>&lt;script&gt;
          yepnope({
      test : Modernizr.mq('(only all)'),
      nope : ['js/libs/respond.min.js']
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>&lt;script&gt;Modernizr.mq('(min-width:0)') || document.write('&lt;script src="js/libs/respond.min.js"&gt;&lt;\/script&gt;')&lt;/script&gt;
  </code></pre>
  
  <p>I have found that the second crashes IE8, but must just need rewriting. Which technique would you recommend?</p>
  
  <p>Thanks for all the help.</p>