Yet another framework syndrome
| Name | Date | URL | Stars |
|---|---|---|---|
| Jake | April 2010 | https://github.com/mde/jake | 1000 |
| Brunch | January 2011 | http://brunch.io/ | 3882 |
Yet another framework syndrome
| Name | Date | URL | Stars |
|---|---|---|---|
| Jake | April 2010 | https://github.com/mde/jake | 1000 |
| Brunch | January 2011 | http://brunch.io/ | 3882 |
I wanted to figure out the fastest way to load non-critical CSS so that the impact on initial page drawing is minimal.
TL;DR: Here's the solution I ended up with: https://github.com/filamentgroup/loadCSS/
For async JavaScript file requests, we have the async attribute to make this easy, but CSS file requests have no similar standard mechanism (at least, none that will still apply the CSS after loading - here are some async CSS loading conditions that do apply when CSS is inapplicable to media: https://gist.github.com/igrigorik/2935269#file-notes-md ).
Seems there are a couple ways to load and apply a CSS file in a non-blocking manner:
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| for s in "${(@f)$(git --no-pager stash list)}"; do git stash show -p $(echo $s | awk -F": " '{print $1}') > "$HOME/Desktop/$(echo $s | awk -F": " '{print $2}' | tr ' ' '-').patch"; done |
| <IfModule mod_expires.c> | |
| ExpiresActive On | |
| ExpiresByType image/jpg "access 1 year" | |
| ExpiresByType image/jpeg "access 1 year" | |
| ExpiresByType image/gif "access 1 year" | |
| ExpiresByType image/png "access 1 year" | |
| ExpiresByType text/css "access 1 month" | |
| ExpiresByType text/html "access 1 month" | |
| ExpiresByType application/pdf "access 1 month" | |
| ExpiresByType text/x-javascript "access 1 month" |
| /** | |
| * @desc this snippet will allow multiple arguments to a search query in Google Chrome | |
| * examples include https://www.reddit.com/r/%s/search?q=%s | |
| * @author Chris McCormack [email protected] | |
| * @required Google Chrome. Replace all values in brackets ([]) with valid entries. | |
| * To add to Chrome, go to Settings > Search [Manage search engines...] > Other search engines. | |
| * At the bottom of this section, there are three required fields: | |
| * [Add a new search engine] [Keyword] [URL with %s in place of query] | |
| * - Add a new search engine: Descriptive name of your search | |
| * - Keyword: used to trigger search. |
| console.log(1); | |
| (_ => console.log(2))(); | |
| eval('console.log(3);'); | |
| console.log.call(null, 4); | |
| console.log.apply(null, [5]); | |
| new Function('console.log(6)')(); | |
| Reflect.apply(console.log, null, [7]) | |
| Reflect.construct(function(){console.log(8)}, []); | |
| Function.prototype.apply.call(console.log, null, [9]); | |
| Function.prototype.call.call(console.log, null, 10); |