title: Should I inline all CSS files programmatically to optimize page load speed?
body: <p>Google PageSpeed often suggests to <a href="https://developers.google.com/speed/docs/insights/OptimizeCSSDelivery" rel="noreferrer">optimize CSS delivery</a>. It occurred to me that it would reduce network round trips to inline all the CSS like this: </p>
  
  <pre><code>&lt;style type="text/css"&gt;
  
      @{ 
          var bootstrap = File.ReadAllText(Server.MapPath("bootstrap.min.css"));
          var bootstrapTheme = File.ReadAllText(Server.MapPath("theme.min.css"));
          var fontAwesome = File.ReadAllText(Server.MapPath("font-awesome.min.css"));
          var bigfont = File.ReadAllText(Server.MapPath("bigfont.min.css"));
          var bigfontPrint = File.ReadAllText(Server.MapPath("bigfont-print.min.css"));
      }
  
      @Html.Raw(bootstrap)
      @Html.Raw(bootstrapTheme)
      @Html.Raw(fontAwesome)
      @Html.Raw(bigfont)
      @Html.Raw(bigfontPrint)
  
  &lt;/style&gt;
  </code></pre>
  
  <p>This seems to be a reasonable solution to the problem of slow page loads and has increased my PageSpeed score to 95 from 88.</p>
  
  <p>Putting code-style aside for the moment, what technical reasons, if any, exist for NOT in-lining all CSS in this way?</p>