Code Monkey home page Code Monkey logo

Comments (3)

gvn avatar gvn commented on August 24, 2024
  • Visual design guidelines
  • Image optimization
  • Code minification
  • Lazy loading

from engineering-handbook.

simonwex avatar simonwex commented on August 24, 2024

@jdotpz could you help @gvn with adding a few other points:

  • Serving assets in non-US regions
  • Serving assets in non-AWS regions

from engineering-handbook.

gvn avatar gvn commented on August 24, 2024

Low Bandwidth

Many of our users are either limited by slow connections or limited data plans (or both). We need to optimize our apps to use as little bandwidth as possible. In addition to data constrained users, this benefits all users by ensuring a speedy, responsive experience.

Visual design guidelines

When designing for low bandwidth users, it's best to rely as little as possible on non-vector imagery. Where possible, pure CSS solutions should be favored as they should be lighter weight and will reduce additional HTTP requests.

When vector illustration can't reasonably be implemented with CSS, it should be exported as a SVG file. If the target client can't support SVG, then an optimized PNG can be used.

Image optimization

When using image files, be sure to use the format appropriate to the contents of the image.

For photographic imagery (ie: images with a high color pallette) the JPEG format should be used. Experiment with the compression level to try and limit the filesize. A quality of 6-8 is a good starting point.

For images with a low color pallette, where SVG isn't an option, you should use a PNG. Once your PNG is created it should also be run through a PNG crusher to further reduce the size.

For OSX two good tools for PNG optimization are ImageOptim and ImageAlpha. You can (and should) do image optimization as part of your build process.

Code minification

All code assets should be minified and concatenated for final deployment. JS should be concatenated and run through Uglify to ensure the smallest possible filesize and the fewest necessary HTTP requests by the end user.

Lazy loading

Try to leverage a lazy loading where possible. If content isn't visible when the page or view is first rendered then it can be load deferred until a user action requires it to be shown. A common example of this is gallery views where many thumbnails are displayed in a list. You can measure the viewport to only load the thumbnails that are currently constrained by the viewport.

Additional Resources

from engineering-handbook.

Related Issues (20)

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.