Skip to content

Instantly share code, notes, and snippets.

@santosh
Last active October 15, 2020 15:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save santosh/d7a144d512d83a01443a to your computer and use it in GitHub Desktop.
Save santosh/d7a144d512d83a01443a to your computer and use it in GitHub Desktop.
Before pushing a site into production, double check these points.

This is an incomplete list:

  • Make spritesheet of all images.
  • Use CDN for static websites
  • Use Audit tools (Chrome)
  • Google PageSpeed
    • Minify the CSS and JavaScript you are using
    • Reduce the HTTP request
    • Optimize the images as much possible

CSS

  • Using px in value haing 0 is useless, remove it
  • imports are heavy, should be avoided when possible
  • Use numerical value instead of relative like lighter bolder bold light with 100-900 for font-weight
  • Instead of using color code #eeeeee use #eee
  • Use the shorthand properties where ever you can

JavaScript

  • Use terenary operator if if statement is 1 level deep
  • Avoid using global variables
  • Use external javascript, always, it makes debugging less painful
  • Compress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment