Freelancer Jonnie Hallman’s fresh perspectives after a 3-month sabbatical
His key learnings included:
1. Establish routines that keep you focused and healthy. Join a gym and eat healthy.
2. Have the confidence and restraint to say no to clients. Empower yourself with the ability to turn down offers–even good offers.
3. Go at a reasonable pace to avoid burnout. Don’t be afraid to take things slowly.
4. Recognize that your sanity comes at a monetary cost–less work means less income. But decide that it is worth it.
Read more at destroytoday.com
Use HTML to tell the browser to prefetch content or even prerender a page
DNS prefetching is supported by IE9+ and all other major browsers.
Amazon.com is already using dns prefetching on its web site:
Subresource prefetching is supported by Chrome. Example:
Content prefetching is supported by IE10+, Chrome and Firefox. Example:
Page prerendering is supported by IE11 and Chrome.
Read more from the source: Medium
You know those fancy device photos designers use in mockups? Well now you can use them in HTML.
Thanks to Tomi Hiltunen and Angelos Arnis you can superimpose your working HTML mockups onto a realistic rendering of devices including iPhone, iPad, iMac, MacBookPro, Galaxy S3, Surface.
There is even an element positioned over the device button to allow the button to do something.
Read more from the source: aarnis.com
Watch for fat arrow syntax in ES6 along with its hard binding of the this keyword
Some notable characteristics of fat-arrow functions:
1. No prototype property and can’t be used as constructors
2. The `arguments` object is not available
3. They are always anonymous
4. `this` is hard bound to the parent scope where the function is declared
Some practical examples:
//return a new array containing the squares of the original…
[1, 2, 3, 4, 5].map(x => x * x);
//[1, 4, 9, 16, 25]
[‘caption’, ‘select’, ‘cite’, ‘article’].map(word => word.toUpperCase());
//[‘CAPTION’, ‘SELECT’, ‘CITE’, ‘ARTICLE’]
Taking advantage of ligatures allows you to create an icon font where the text “Cart” renders a shopping cart
From the article by Dudley Storey
However, there are three fundamental disadvantages to icon fonts, two of which are also shared by image sprites:
1. Most icon fonts are not accessible: typing “L” to produce a Like button means that visitors who use a text-to-speech service to read your site will only hear “L” as a description of the icon. While there are solutions to this issue, they use CSS tricks that are, in this author’s humble opinion, somewhat convoluted and better left behind.
2. Search engines are confronted with the same issue, as they read text, not icons, and “L” makes little sense to Google.
3. Looking up codes for icons and typing in HTML entities to produce them is a pain: as an example, see the character map for Entypo.
Ligature icon fonts eliminate both of these issues. As I’ve explained previously, ligatures are joined or merged letter forms that are generated to produce smoother type with better spacing: a single glyph to replace the otherwise ungainly “fi” letter pairing, for example.
Read more from the source: demosthenes.info