#Website Performance Optimization portfolio project
Several optimizations have been made to this portfolio to make index.html
achieve at least a score of 90 according to Google PageSpeed Insights, as well as optimizing pizza.html
to run at a rate of 60 fps or better.
Click this link for the Front-End Nanodegree Mobile Portfolio to see index.html
, and then click this link for Cam's Pizzeria Page to see pizza.html
.
- Asynchronous loading of Google WebFont (a JS file)
- Asynchronous loading of the Google Analytics tracker
- Asynchronous loading of the performance tracker
- Inlining of the CSS (to prevent round trips)
- Image optimization of large image files, specifically
pizzeria.jpg
- Image optimization of large image files, specifically
pizzeria.jpg
- The addition of
will-change: transform;
to the.mover
class - The addition of
will-change: transform;
to the.randomPizzaContainer
class
- Reduced the number of pizzas needed in the background from 200 down to a dynamically-selected number based on
window.innerHeight
- Optimized the
updatePostions
function to reduce the number of calculations and functions being made within the iteration loop, especiallyscrollTop
- Optimized the
changePizzaSizes(size)
function to reduce the number of calculations and functions being made within the iteration loop. - Replaced instances of
querySelector()
withgetElementById()
- Replaced instances of
querySelectorAll()
withgetElementsByClassName()
- Refactored
changePizzaSizes(size)
to remove unnecessary functions and document calls.