# 7 Things I've Learnt Optimizing Baz's site 

[TOC]

## Site

* [http://zabirvalliji.co.uk/] (http://zabirvalliji.co.uk/)

* [http://zabirvalliji.co.uk/] (http://zabirvalliji.co.uk/) 

 

* Wordpress

 

* 2 Pages

 

* Responsive

* [http://zabirvalliji.co.uk/] (http://zabirvalliji.co.uk/) 

 

* Wordpress

 

* 2 Pages

 

* Responsive

 

* Animations

## YSlow

## 14 Rules

## 7 Things

### Thing 1: Make Fewer HTTP Requests

* Image Sprites

* Image Sprites

 

* File Concatenation

* Image Sprites

 

* File Concatenation

 

CDN

### Thing 2: Gzip Compression

_Update `            ` file with:_

 

. . . . 

.htaccess

### Thing 3: Cache Yo

+ Add Expires Header

 

+ Add Expires Header

 

+ Remove Etag

+ Add Expires Header

 

+ Remove Etag

 # Remove Etag
 Header unset Pragma
 FileETag None
 Header unset ETag

+ Add Expires Header

 

+ Remove Etag

 

+ CDN

### Thing 4: Stylesheets and Scripts Organization

* No Inline Styles or Scripts

* No Inline Styles or Scripts

 

* Stylesheets at the Top - Scripts at the Bottom

* No Inline Styles or Scripts

 

* Stylesheets at the Top - Scripts at the Bottom​

 

* Separate Files for Desktop and for Mobile

### Thing 5: Minify

- Image Minification

 

- CSS Minification

 

  [Online Tool] (http://refresh-sf.com/)

- Image Minification

 

- CSS Minification

 

- JS Minification

 

  [Online Tool] (http://refresh-sf.com/)

- Image Minification

 

- CSS Minification

 

- JS Minification

 

- Custom builds

 

[jQuery] (http://projects.jga.me/jquery-builder/) 

 

[Bootstrap] (http://getbootstrap.com/customize/) 

### Thing 6: Background Images -> CSS

+ Gradients

 

+ Icons -> Font Icons

 

  [Icon Generator] (https://icomoon.io/app/#/select)

+ Gradients

 

+ Icons -> Font Icons

 

+ Transparent Background

 

 

`background: rgba(R, G, B, A)`

### Thing 7: JS Animations -> CSS Animations

@keyframes

 

. . . . 

   @keyframes fadeIn {
       0% {opacity: 0}
       100% {opacity: 1}
   }

@keyframes

 

* Transitions 

 

  `                                                                           `

transition: background-position 0.5s ease

## Recap

1. Thing 1: Make Fewer HTTP Requests

 

2. Thing 2: Gzip Compression

 

3. Thing 3: Cache Yo

 

4. Thing 4: Stylesheets and Scripts Organization

 

5. Thing 5: Minify

 

6. Thing 6: Background Images -> CSS

 

7. Thing 7: JS Animations -> CSS Animations

## Markdown

7 Things

By workslon

7 Things

  • 434