GithubHelp home page GithubHelp logo

cschonhaut / frontend-nanodegree-mobile-portfolio Goto Github PK

View Code? Open in Web Editor NEW

This project forked from udacity/frontend-nanodegree-mobile-portfolio

0.0 2.0 0.0 12.67 MB

CSS 5.33% HTML 49.36% JavaScript 45.31%

frontend-nanodegree-mobile-portfolio's Introduction

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.

Challenge accepted!

##Part 1: Optimize PageSpeed Insights score for index.html

###My optimizations: To complete this project I had to configure a Grunt workflow, which was very tedious and time-consuming but seems like it will be well worth the work in the future. Using Grunt, I was able to minify all of my images, minify my CSS, and inline my CSS. I added a media query to my CSS so that "print" styles would only load if the query was met. I also loaded my Javascript asynchronously to prevent JS render blocking.

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

###My optimizations: In order to view my page speed insights score, you can reference my GH page in my branch on Git, or reference this link: https://cschonhaut.github.io/frontend-nanodegree-mobile-portfolio/

For the changePizzaSizes function, I moved some variables outside of the loop in order to load faster. I also used a more specific calling mechanism (getElementsByClassName). The more specific call produces fewer results, leading to faster load time.

The optimizations I made to the updatePositions function were very similar. I used a more specific calling mechanism again, and I made sure to access the DOM outside the loop instead of inside (as the original).

My scroll time is an average of about a millisecond, well beneath the goal of 16ms in order to achieve 60/fps The time it takes to resize the pizzas is consistently under 2ms My pagspeed insights score on mobile is 95, and on desktop is 94!

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.

frontend-nanodegree-mobile-portfolio's People

Contributors

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

Watchers

James Cloos avatar Chelsea Schonhaut 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.