Website optimization using Google PageSpeed Insights score to evaluate page speed. The second part of the project is the optimization of Frames per Second(fps) in pizza.html.
Click here for the live index.html for PageSpeed Insights evaluation
Click here for the live pizza.html for frames per second evaluation Open the console window to review statistics.
PageSpeed Insights Score Before Optimization:
Mobile: 27/100
Desktop: 29/100
- Compress images. Images have a huge impact on page speed.
- Use a font loader. "After images, fonts are the normally the largest assets in your web page."(See #1, Resources).
- Concatenate, minify and inline css.
- Move google analytics code from the head to right before the closing body tag.
PageSpeed Insights Score After Optimization:
Mobile: 97/100 😃
Desktop: 97/100 😃
- Change querySelector to getElementById (See #3, Resources)
- Use class, not style. (See #4, Resources)
- Put operations outside of loops when possible.
- How to Improve Page Performance with a Font Loader
- Loading Web Fonts with the Web Font Loader
- Performance: getElementById vs. querySelector
- Performance: Class vs. Style
- Where did rendering go in Chrome DevTools
- Markdown Cheat Sheet
- Photo Resizer
- Photo Compressor
- Timeline Profiling with Chrome DevTools
- Interesting perspective from a Chromium Developer
- document.createDocumentFragment()
- Faster DOM
- Web Page Test
- Progressive JPEGs
- Cloudinary
- Using Chrome Developer Tools to Analyze Web Performance
- Web Performance Optimization Blog
Scrolling speed may not be 60 fps on more modest devices. For those devices, enabling hardware accelerated composition makes a huge difference. You could use translateX instead of style.left in the main.js file, or, a little trick to make it simpler. Add these properties to .mover in the css file.
-webkit-backface-visibility: hidden; /* Chrome, Safari, Opera */
backface-visibility: hidden;
- DOM, CSSOM and blocking
- Latency, not bandwidth, is the problem
- Testing responsiveness on variety of devices
- Audit tab and how to use it
- Pinpoint JS bottlenecks
- Waterfall chart
- Various times of navigation timing
- Factors that effect performance