Comments (3)
- Visual design guidelines
- Image optimization
- Code minification
- Lazy loading
from engineering-handbook.
@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.
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)
- Write a Chapter: Offline
- Implement assertions in #16 into the master branch as a sample project
- Write a Chapter: Automated Testing HOT 7
- Write "Accessibilty" into the Handbook HOT 1
- Setup dynamic DNS for sendto.mozilla.org
- Create a hosted Paypal form with transparent redirect
- Get SSL for sendto.mozilla.org setup
- Setup monitoring to know when DNS flips for BSD
- Write shared chapter on working w/ designers
- Write a Chapter: "Where we work open" HOT 1
- Write a Chapter: "Front End UI Libraries" HOT 6
- When should we consider using Flux? HOT 4
- ES6
- Explain how Hotfixing works in onboarding/preflight.md
- Document groups and repos used for github in MoFo Dev
- Write [short] chapter on MoFo implementation of git-flow. HOT 10
- Discussion: What are the best "Learning React" resources? HOT 3
- Sisyphus: The Big Batch Wolf HOT 2
- maintainable client-server relationships
- Stub/write the playbook for "large investment projects" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from engineering-handbook.