Giter VIP home page Giter VIP logo

performance-optimization's Introduction

Website Optimization Challenge

Optimize a website to gain at least a 90/100 for desktop and mobile on Google's PageSpeed Tool and run at 60 FPS while scrolling. Techniques utilized to optimize website include:

  • Javascript and CSS minification
  • Image compression
  • Improving page's critical rendering path (CRP)
  • Responsive images
  • Google Chrome development tools

Table of Contents

Installation and Run

Grab code source:

  • Clone repository: git clone https://github.com/brianquach/udacity-nano-front-optimization.git or download the zip here.
  • Navigate to the directory where you cloned the repo or unzipped the file to and open folder dist.
  • Use your favorite browser to open index.html.

Developers (optional): To run project's build process follow the following instructions:

  • Install Gulp.
  • Navigate to project's root folder.
  • Run npm install to let npm install required Gulp plugins.
  • Run gulp optimize.

Friendly reminder: Changes to JS and CSS or image files should be done in the src folder because that's where Gulp expects project assets to be.

Optimization Steps

  • Asynchronously download non-critical javascript by adding async script attribute.
  • Move importing CSS and Google Fonts to bottom of HTML body.
  • Gulp task to compresses all images.
  • Gulp task to create thumbnail version of pizzeria.jpg for index.html.
  • Cache javascript document query variables to reduce javascript DOM lookup time.
  • Refactor javascript in resizePizzas function to avoid layout reflow as much as possible.
  • Refactor javascript in updatePositions function and DOMContentLoaded event trigger to avoid layout reflow.
  • Move inline styles into CSS classes.
  • Gulp task to create more efficient sizes of pizzeria.jpg for views/pizza.html.
  • Gulp task to minify JS and CSS.

Creator

Brian Quach

Copyright and License

Code copyright 2016 Brian Quach. Code released under the MIT license.

performance-optimization's People

Contributors

aaronbutler avatar brianquach avatar cameronwp avatar durant-udacity avatar hkasemir avatar mrk-nguyen avatar nicolasartman avatar safadurimo avatar susansmith avatar walesmd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.