Book Image

Mastering jQuery Mobile

Book Image

Mastering jQuery Mobile

Overview of this book

Table of Contents (17 chapters)
Mastering jQuery Mobile
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Best practices for images


Images are an integral part of any website and add a lot of flavor to it. E-commerce sites rely mainly on these images, and such sites just can't be slow when accessed on a mobile device. We will take a look at some ways to optimize images and effectively optimize website performance.

Don't use images at all

Yes, that is right, and yes, we are not crazy. You can make use of icon fonts and Scalable Vector Graphic (SVG) icons, which are scalable and can easily be customized. An icon font is basically a font file filled with icons and glyphs instead of the usual letters. To use the icon font, simply embed the icon web font, and you will be able to use any icon you need. SVGs are truly scalable vector graphics that you can use on the web.

Why do we need to use this, you ask. Well, the icon fonts and SVG icons solve a major problem for the mobile website. With the advent of multiple-dpi phones, designers have to build icons of different sizes to support the 2x and 3x retina...