Coder Social home page Coder Social logo

frontend-nanodegree-mobile-portfolio's Introduction

Website Performance Optimization portfolio project

This project is a practice on Udacity's course Website Performance Optimization which explains how to measure and optimize any website.

Getting started

  • You can check the PageSpeed Insights score for index.html by pasting it's url in PageSpeed Insights

  • You can use the FPS Counter/HUD in Chrome developer tools to find the number of Frames per Second in pizza.html

Optimization

  Index.html

  • Removed render blocking for Analytic script that is not critical to initial render by adding async attribute.
  • Removed render blocking from css/print.css CSS styles that are only used under certain conditions by adding print media type .
  • Minimzed the number of additional HTTP requests blocking initial rendering, by inlining critical style.css file.
  • `Compressed and optimize the used images.
  • Minified CSS and JavaScript files.

  Main.js

  • Replaced all querySelectorAll by getElementsByClassName to enuser higher oprations performed per second
  • Replaced all querySelector by getElementsById to enuser higher oprations performed per second
  • Reduced the time to resize pizza to less then 5ms by reducing the cost of accessing the document everytime inside the changePizzaSizes loop, and instead access the document one time to find the matching element and store it in a variable.
  • Removed calculating the never changing new width of the pizza form inside the changePizzaSizes loop.
  • Updated updatePositions function by removing variables items and scrollTop from the loop since they're not changin.
  • Reduced the number of pizzas from 200 to 48.

frontend-nanodegree-mobile-portfolio's People

Contributors

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

Watchers

 avatar  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.