criticalCSS
criticalCSS copied to clipboard
Add an option to set cookies that are passed to phantom
Going to expand on this - should also add the ability to pass in headers. Make it as close to a real request to a page as possible.
If you guys are going to support cookies, would throwing in support for localStorage be out of the question?
This tool itself doesn’t actually depend on or utilize cookies. The readme recommends that as an optional optimization you can take to avoid inlining once the full css is in cache, but it’s the sort of thing you’d need to wire up yourself in your server side templates.
The advantage with cookies here are that cookies are available on the server-side, so you can configure a template to directly reference your css file when the cookie is present.
LocalStorage options are fine to consider but they’ll require some JS processing on the client and I’m not sure how LS could be used to avoid inlining CSS on subsequent loads anyway. So, we’d recommend cookies if you can.
On Mar 14, 2015, at 2:06 AM, Michael Dyer [email protected] wrote:
If you guys are going to support cookies, would throwing in support for localStorage be out of the question?
— Reply to this email directly or view it on GitHub.