Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
critical
Advanced tools
Changelog
v0.0.1 / 2014-06-28
Readme
Critical Path CSS generation & inlining
npm install -g critical
Include:
var critical = require('critical');
###Generate critical-path CSS
critical.generate({
base: 'test/',
src: 'index.html',
dest: 'styles/main.css',
width: '320',
height: '480',
}, function(output){
// You now have critical-path CSS
});
###Inline critical-path CSS
critical.inline({
base: 'test/',
src: 'index-critical.html',
dest: 'critical.html'
}, function(output){
// You now have HTML with inlined critical-path CSS
});
CSS is required to construct the render tree for your pages and JavaScript will often block on CSS during initial construction of the page. You should ensure that any non-essential CSS is marked as non-critical (e.g. print and other media queries), and that the amount of critical CSS and the time to deliver it is as small as possible.
For best performance, you may want to consider inlining the critical CSS directly into the HTML document. This eliminates additional roundtrips in the critical path and if done correctly can be used to deliver a “one roundtrip” critical path length where only the HTML is a blocking resource.
FAQs
Extract & Inline Critical-path CSS from HTML
We found that critical demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.