Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 1.25 KB

README.md

File metadata and controls

20 lines (16 loc) · 1.25 KB

Website Performance Optimization portfolio project

Usage: Click on index.html or visit my github page http://tianyeblack.github.io/Yesperf ###Part 1: Optimize PageSpeed Insights score for index.html

  1. Minifying CSS and JS files, provided by PageSpeed;
  2. Using JS to load small CSS file instead of blocking critical rendering process;
  3. Making all the GA JS asynchronous because they need not to be executed right away or waiting for certain resources;
  4. Minimizing the images used because there is no chance it will be that large on the front page;
  5. Moving non-critical JS files to the end;
  6. Giving "pring.css" a media tag;
  7. Removing third-party font because they block the pipeline and are not worth the cost;

###Part 2: Optimize Frames per Second in pizza.html

  1. Promoted the sliding pizzas to different layers so only they are repainted each time, trade painting off with layouts;
  2. Reduced the sliding pizzas number to a reasonable one (depending on how large the window is);
  3. Stored the values inside an array so there are way fewer forced layout invalidation;
  4. Switch to getElementById and getElementsByClassName instead of queryBySelector;
  5. Calculating the phase information first for there are always only 5 phases at a certain scroll position;