DOM Monster (@dom_monster) profile picture

Follow me for daily DOM/JS tips! Favorite snacks: BLINK tags

In yr DOM
Joined January 2011
Just send one high-res asset instead of a low-res first and load high-res later for mobile Retina. mir.aculo.us/2012/08/06/high…
1
1
Responsive design can work great, but you might inadvertently load assets you don't need. Test what gets loaded.
1
1
DOM Monster retweeted
It’s that scary time of the year—when zombie clients want to eat your brains! Get the survival guide! letsfreckle.com/zombie-clien… – at Philadelphia, PA
Avoid having htttps://-based assets on your http://-served site. Source of slowness!
1
2
In HTML5, <script> is enough. No need for the “type” or “charset” attributes.
4
3
Did you know that you don't actually need a <html> tag to write HTML?
Meet my cousin @retinafy for tips on supporting retina screens in your web sites and apps.
1
1
Kill time during the boring parts of the WWDC keynote by optimizing the loading speed of your site a little.
2
2
The lowest hanging fruit in web performance is proper caching & gzipping. If you do one thing only, do that.
4
2
Replying to @dom_monster
@dom_monster you may be interested in this: github.com/paolochiodi/htmlc…
In some situations, where you want to serve different, hand-optimized images (e.g. icons), use media queries.
1
1
Note that "retina" resolution will become a standard thing on desktops pretty soon, too.
1
4
Don't use scripts like retinajs.com/ (extra HTTP requests are really slow!), instead just always serve hi-res images.
4
8
10
Inlining CSS, WebFonts and images into your HTML file can drastically improve loading times for users on 3/4G.
3
2
...e.g. write `if (true) something()` instead of `if (true) { something(); };` 2/2
1
While you're removing those semicolons, don't forget to get rid of extraneous curly braces in control flow statements... 1/2
Guess how long the smallest possible valid HTML5 document is? mathiasbynens.be/notes/minim…
2
4
Don't let anyone tell you something is "impossible" or "shouldn't" be done. Experiment. Find your own solutions. Share them.
12
5