Cường Trần
Cường Trần on slides.com
By Cường Trần / cuongtran3001@gmail.com
Styles at the top, script at the bottom
http://blog.arkency.com/2014/10/frontend-performance-tips-for-web-developers/
Try async
Using content delivery networks(CDN)
Remove duplicate JS/CSS/FONT files
Minimizing HTTP requests
Concat css/js
CSS sprites
Avoid making bad requests
Reduce cookie size
Minify css/js
Optimize image
Progessive JPGs
Remove unsupported components
Use faster framework/library
Avoid repaint
Avoid DOM manipulation
Use latest version
Browser cache
Browser cache - JS & CSS
Browser cache - Cache-Control policy
Sprites:
Using base64:
<img alt="Embedded Image"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA..." />Don't scale image in HTML
Select the right image format:
Select the right image format:
Reduce the number of DOM elements
Use both local() and url()
@font-face {
font-family: 'Awesome Font';
font-style: italic;
font-weight: 400;
src: local('Awesome Font Italic'),
url('/fonts/awesome-i.woff2') format('woff2'),
url('/fonts/awesome-i.woff') format('woff'),
url('/fonts/awesome-i.ttf') format('ttf'),
url('/fonts/awesome-i.eot') format('eot');
}Use unicode-range
@font-face {
font-family: 'Awesome Font';
font-style: normal;
font-weight: 400;
src: local('Awesome Font'),
url('/fonts/awesome-jp.woff2') format('woff2'),
url('/fonts/awesome-jp.woff') format('woff'),
url('/fonts/awesome-jp.ttf') format('ttf'),
url('/fonts/awesome-jp.eot') format('eot');
unicode-range: U+3000-9FFF, U+ff??; /* Japanese glyphs */
}Font loading???
Avoid CSS expressions
Reduce the unnessesary CSS rules
Minimize DOM access
Develop smart event handlers
Goole page speed
By Cường Trần
Improve Frontend performance