- Minified and inlined style.css file .
- Minified JS .
- Added async to javscript.
- Added media print to print css file .
- Optimized images (profilepic.jpg , pizzeria) .
- Moved the google webfont link at the end of the page.
To run the project Open the Index.html File
- deleted sizeSwitcher function and optmize changePizzaSizes (line 430 ).
- replaced querySelector with getElementById (lines 409,413,419,532 ).
- replaced querySelector with getElementsByClassName (lines 496 ,444 ).
- save the array length in a local variable (line 446)
- moved scrollTop out from for loop (line 499 ).
- change loop counter from 200 to 24 and Declaring the elem variable (var elem;) in the initialisation of the for-loop (line 523 ).
- declared the pizzasDiv variable outside the loop (line 464)
- Added "will-change: transform" on style.css file .
- Added " transform: translateZ(0); and backface-visibility: hidden;" on style.css file .
#####To run the project Open the pizza File in view/pizza.html #####To show javascript code open file main.js in views/js/main.js
- Optimizing Performance
- Analyzing the Critical Rendering Path
- Optimizing the Critical Rendering Path
- Avoiding Rendering Blocking CSS
- Optimizing JavaScript
- Measuring with Navigation Timing. We didn't cover the Navigation Timing API in the first two lessons but it's an incredibly useful tool for automated page profiling. I highly recommend reading.
- The fewer the downloads, the better
- Reduce the size of text
- Optimize images
- HTTP caching
The portfolio was built on Twitter's Bootstrap framework. All custom styles are in dist/css/portfolio.css
in the portfolio repo.