Adds inline content files to html output You can use this library to draw critical css or js files to html output in asp.net mvc projects You can find details about critical css here
@using InlineContentHelper.Helpers
<html>
<head>
@Html.InlineStyles("critical-style")
@Html.InlineScripts("critical-script")
</head>
</html>
You need to add your files under Contents folder Contents
=> script
=>critical-script.js
=>critical-script.mobile.js
=> style
=>critical-style.js
=>critical-style.mobile.js
Like ASP.NET MVC Dislay Mode support, InlineContentHelper also support different files in different display mode. If you use
@Html.InlineStyles("critical-style")
library adds .mobile extension for mobile page rendering.
Library cache inline-files after first fetch. It uses dictionary to cache string items. You can look at FirstLevelCacheManager