Skip to content

Optimised an inefficient web application's JavaScript, CSS and assets delivery, ensuring it runs at 60fps and achieves a PageSpeed score of at least 90.

License

Notifications You must be signed in to change notification settings

nglthu/web_Optimization

Repository files navigation

licence badge stars badge forks badge issues badge

Introduction

Optimised an inefficient web application's JavaScript, CSS and assets delivery, ensuring it runs at 60fps and achieves a PageSpeed score of at least 90.

Website Optimization Step By Step

Online web: Link

Avoid landing page redirects

Page has no redirects.

CSS is minified

HTML is minified

Optimize images

Optimisation all images using tiny png:

JS is minified

Eliminate render-blocking JavaScript and CSS in the-fold content try to use inline style and asyn JS. use script for web font of Open Sans

Optimization Frame per second in pizza.html

Modify views/js/main.js until frames per second rate is 60fps of higher.
set number of pizza mover is changed with height of screen 

Optimisation updatePositions in main.js:
+Access DOM by getElementsByClassName than querySelectorAll
+Moved the phase calculation into its own for loop that appends each phase to an array, rather than declaring and setting the phase variable each time.  Using push method to add phase into array. 
Recording test:
https://nglthu.github.io/web_Optimization/imagesSolution/webOptimisation.png

Website Performance Optimization portfolio project

Your challenge, if you wish to accept it (and we sure hope you will), is to optimize this online portfolio for speed! In particular, optimize the critical rendering path and make this page render as quickly as possible by applying the techniques you've picked up in the Critical Rendering Path course.

To get started, check out the repository and inspect the code.

Getting started

Part 1: Optimize PageSpeed Insights score for index.html

Some useful tips to help you get started:

  1. Check out the repository
  2. To inspect the site on your phone, you can run a local server
$> cd /path/to/your-project-folder
$> python -m SimpleHTTPServer 8080
  1. Open a browser and visit localhost:8080
  2. Download and install ngrok to the top-level of your project directory to make your local server accessible remotely.
$> cd /path/to/your-project-folder
$> ./ngrok http 8080
  1. Copy the public URL ngrok gives you and try running it through PageSpeed Insights! Optional: More on integrating ngrok, Grunt and PageSpeed.

Profile, optimize, measure... and then lather, rinse, and repeat. Good luck!

Part 2: Optimize Frames per Second in pizza.html

To optimize views/pizza.html, you will need to modify views/js/main.js until your frames per second rate is 60 fps or higher. You will find instructive comments in main.js.

You might find the FPS Counter/HUD Display useful in Chrome developer tools described here: Chrome Dev Tools tips-and-tricks.

Optimization Tips and Tricks

Customization with Bootstrap

The portfolio was built on Twitter's Bootstrap framework. All custom styles are in dist/css/portfolio.css in the portfolio repo.

About

Optimised an inefficient web application's JavaScript, CSS and assets delivery, ensuring it runs at 60fps and achieves a PageSpeed score of at least 90.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published