Skip to content

JamesLogan-III/frontend-nanodegree-mobile-portfolio

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Website Performance Optimization portfolio project

Optimizations

updates to views/js/main.js

Based on the FEND Office Hours

  • refactored loops to remove duplicated or unessesary events form loops for the updatePositions() and changePizzaSizes(size) functions.
  • added getDomNodeArray(selector) from Instructor notes in class to use forEachloops
  • removed the generateDX function and rewrote the changePizzaSizes() function to use the getDomNodeArray(selector) function
  • rewroterequestAnimation() function per the Animation Tutorial @ HTML5ROCKS.com
  • added onScroll() and updated the event listener
  • added backface-visibility: hidden to the .mover class elements to use GPU painting
  • switched out document.querySelector for the better performing document.getElementByID

updates to index.html

  • optimized images based on results from [Google Page Speed]
  • moved CSS and Javascript to end of file and switched to Async loads
  • minimized the HTML file

Running the portfolio

  1. To inspect the site, you can run a local server, I use WAMPServer

  2. Check out the repository, into your webserver root folder, WAMPServer will pickup the folder automatically.

  3. Open a browser and visit localhost:<<PORT_NUMBER>>

  4. To use the Google Page Speed Insights site you will need to download and install ngrok to make your local server accessible remotely.

$> cd /path/to/your-project-folder
$> ngrok <<PORT_NUMBER>>
  1. Copy the public URL ngrok gives you and try running it through PageSpeed Insights! Optional: More on integrating ngrok, Grunt and PageSpeed.

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, 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 make your local server accessible remotely.
$> cd /path/to/your-project-folder
$> ngrok 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.

Sample Portfolios

Feeling uninspired by the portfolio? Here's a list of cool portfolios I found after a few minutes of Googling.

About

Udacity Front-end Developer Course Project 4 -- Website Optimization

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 61.3%
  • HTML 37.1%
  • CSS 1.6%