title: Optimizing css delivery not loading the css file in codeigniter php
body: <p>Optimizing css delivery in pagespeed insights not loading the css file.
  I have tried loading the css file by using jquery but the problem is css is not loading.</p>
  
  <p>My code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function(){
  
  if($(".bs-example").size()&gt;0){
          if (document.createStyleSheet){
              document.createStyleSheet('&lt;?php echo base_url();?&gt;theme/css/style.css');
          }
          else {
              $("head").append($("&lt;link rel='stylesheet' href='&lt;?php echo base_url();?&gt;theme/css/style.css' type='text/css' media='screen' /&gt;"));
          }
      }
  });
  </code></pre>
  
  <p></p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;body&gt;
  
  &lt;div class="bs-example"&gt;&lt;/div&gt;
  </code></pre>