Google Confidential & Proprietary Best Practices for Reducing HTML5 File Size Q2 2015.

Slides:



Advertisements
Similar presentations
Microsoft TM SharePoint Content Management SystemTutorial By Mazen Abdallah Student Assistant at CNS 2010.
Advertisements

Gdes2000 Graphic Design for Internet & Multimedia An Introduction to Dreamweaver CS5 + Adding Text Overview of palettes and DW working environment. Creation.
CHAPTER 15 WEBPAGE OPTIMIZATION. LEARNING OBJECTIVES How to test your web-page performance How browser and server interactions impact performance What.
Iframes & Images Using HTML.
Sculpt Framework Mobile-First with Progressive Enhancement.
Chapter 6 Preparing and Publishing Applications. Chapter 6 Lessons 1.Publish movies 2.Reduce file size to optimize a movie 3.Create a preloader 4.Publish.
Understand the Macromedia Flash environment Open a document and play a movie Create and save a movie Work with layers and the timeline Plan a Web site.
Chapter 6 Photoshop and ImageReady: Part II The Web Warrior Guide to Web Design Technologies.
Objective Understand web-based digital media production methods, software, and hardware. Course Weight : 10%
1 Mobile Computing Mobile First (formerly Worklight) Copyright 2015 by Janson Industries.
Macromedia Flash MX 2004 – Design Professional Macromedia Flash MX GETTING STARTED WITH.
© 2010 Delmar, Cengage Learning Chapter 6: Preparing and Publishing Movies.
Web Design Basic Concepts.
Performance, SEO, Accessibility Ivan Zhekov Telerik Corporation
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 2: Working with Webpage Files.
IT Website Development Welcome!. Welcome to Unit 7! Optimizing Images and creating photo albums in Dreamweaver There are no textbook readings for.
11 Games and Content Session 4.1. Session Overview  Show how games are made up of program code and content  Find out about the content management system.
What is Web Design?  Web design is the creation of a Web page using hypertext or hypermedia to be viewed on the World Wide Web.
CIT 256 Organizing Large Websites: Divs, DW Templates Dr. Beryl Hoffman.
PhoneGap Development How to make an app using PhoneGap Build ? Presentation By MobilePundits.
Web Graphics Image File Formats Image optimization Accessibility issues Using images and colors on the web.
Dynamic Web Pages (Flash, JavaScript)
BUILDING RICH MEDIA ELEMENTS. Design Decisions Based on Design Specification  Following the design specification will ensure that the application is.
Keeping Front End Dependencies Under Control Rachel Lehman Technical Team at Interfolio, -
Creating Web Pages Overview. Design – Start with a Purpose Before you start any web page, you need to design the website. The first question that should.
Chapter 4 Adding Images. Chapter 4 Lessons Introduction 1.Insert and align images 2.Enhance an image and use alternate text 3.Insert a background image.
Graphic images for computers Stored in files of binary data - Binary blobs Software has to know the binary format to decode the file and render an image.
Chapter 19: Adding JavaScript
Tutorial 6 Working with Bitmaps and Gradients, and Publishing Flash Files.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
Advanced Level Course. Site Extras Site Extras consist of four categories: Stationeries Site Trash Designs Components.
Unit 1 – Improving Productivity Instructions ~ 100 words per box.
Dm 11 – Intro. To Flash Macromedia Flash MX GETTING STARTED WITH.
Tutorial 121 Creating a New Web Forms Page You will find that creating Web Forms is similar to creating traditional Windows applications in Visual Basic.
Cross Site Integration “mashups” cross site scripting.
Motif 2.0 Summary Motif is built on the strength on Macromedia and Double Click. The heart of Motif is the Motif Ad Kit – let you create preview and publish.
Data and Reporting Workstream September, GAD Process: Eyeblaster Training.
University of Sunderland CDM105 Session 6 Dreamweaver and Multimedia Fireworks MX 2004 Creating Menus and Button images.
Presented by Graduate Design Group 2 Meredith, Jennifer, Cammay and Diane.
FILES AND ASSETS PANELS
Abigail morris.  Today I'm going to be explaining why the Internet relies on a number of protocols in order to function properly.  A protocol is simply.
Quick Introduction to creating Eyeblaster ads.  Steps for creating an Eyeblaster ad  Building Eyeblaster compatible flash assets  Adding Eyeblaster.
PERFORMANCE ENHANCEMENT IN ASP.NET By Hassan Tariq Session #1.
Computer Graphics Unit 23 Computer Graphics. Computer Graphics Computer generated imagery can be categorized into several different types: Vector or Bitmap.
Reading Flash. Training target: Read the following reading materials and use the reading skills mentioned in the passages above. You may also choose some.
Intro to jQuery. What is jQuery? A JavaScript library Lightweight (about 31KB for the minified version) Simplifies HTML document traversing (DOM), event.
Restricted © Siemens AG All rights reserved A Developer’s Insights Into Performance Optimizations for Mobile Web Apps CT DC AA EM LP2 | June 2015.
WRA 210: 10/7/13 IMAGES. TODAY’S AGENDA Reminder about Module 8 - test your links!Module 8 Overview of hierarchies, naming How images work on the web.
Bundles, Minification Andres Käver, IT Kolledž
Understanding Web-Based Digital Media Production Methods, Software, and Hardware Objective
Adobe Flash Professional CS5 – Illustrated Unit E: Optimizing and Publishing a Movie.
Intro to Web Performance Ten Ways to a Faster Website Presented by: Sheila Eaton and Mohammad Durrani TechKnowFile, University of Toronto, May 5, 2016.
Website: Contact:
HTML5 and CSS3 Illustrated Unit F: Inserting and Working with Images.
Adobe ® Photoshop ® CS6 Chapter 1 Editing a Photo.
MICROSOFT AJAX CDN (CONTENT DELIVERY NETWORK) Make Your ASP.NET site faster to retrieve.
Enhance Your Page Load Speed And Improve Traffic.
MicrosoftTM SharePoint Content Management SystemTutorial
JQuery Fundamentals Introduction Tutorial Videos
Objective % Select and utilize tools to design and develop websites.
Web Community November 18th, 2016.
DW Tutorial 5 Sessions 5.1 & 5.2 REVIEW
ASP.NET Core Tag Helpers
Objective % Select and utilize tools to design and develop websites.
IMAGE SIZE AND RESOLUTION
Adding Assignments and Learning Units to Your TSS Course
Prepared for Md. Zakir Hossain Lecturer, CSE, DUET Prepared by Miton Chandra Datta
Objective Understand web-based digital media production methods, software, and hardware. Course Weight : 10%
Introduction to JavaScript & jQuery
Yale Digital Conference 2019
Presentation transcript:

Google Confidential & Proprietary Best Practices for Reducing HTML5 File Size Q2 2015

Google Confidential & Proprietary A common complaint in the Flash vs HTML5 debate is that HTML5 Creatives are really heavy in terms of file size. The reason for this misconception is because Flash is an application that not only handles the creation of ads, but also the compression of them. “HTML5 Creatives”, on the other hand, commonly refers to ads created with the programming languages HTML, CSS, and Javascript. HTML5 Creatives provide many opportunities to compress your files. Many of the tips provided can be implemented in under 15 minutes. The payoff is that a well-compressed HTML5 Creative will perform much better than a Flash Creative.well-compressed HTML5 Creative will perform much better than a Flash Creative Overview

Google Confidential & Proprietary Table of Contents 1.Google Web Designer 2.How to Check Your File Size 3.Polite Load and Publisher Specs 4.Reducing Image Size 5.CSS and Animation 6.Reducing Javascript Size 7.Optimizing Google Fonts

Google Confidential & Proprietary Google Web Designer

Google Confidential & Proprietary Google Web Designer Google Web Designer (GWD) is an application specifically made for HTML5 ad development by Google, and is a great HTML5 alternative to developers that are only familiar with Flash. GWD has built in compression for images and code, Google web font support, SVG support, CSS animation support, etc. Additionally, it is fully integrated with Studio. GWD is highly recommended above anything else when developing ads. More information on GWD can be found in the GWD Help Center.GWD Help Center

Google Confidential & Proprietary How to Check Your File Size

Google Confidential & Proprietary Total File Size vs. Compressed File Size The total file size (‘Raw File Size’) of your Creative can be viewed in DoubleClick Studio here. In Google Web Designer, you can view size of your Creative in the Publish panel. Google Web Designer compresses Creatives with gZip.here Publish panelgZip To determine your Creative’s compressed size, simply download a free copy of gZip, compress them on your local workspace, and inspect the file size. Depending on the Publisher’s ad server, they will be calculating the compressed size of your Creative. Always double check with your Publisher to be sure.

Google Confidential & Proprietary What is a good baseline for HTML5 Creative file size? It’s essential to understand your Publisher’s ad serving specifications prior to building your Creative. However, many Publishers follow the IAB recommendation of 35KB (compressed) Initial Load for the Creative and 100KB for total Creative size. Initial Load refers only file size of the.html file in the Creative, not the Enabler, Javascript, CSS, or other image files, but again, check with your Publisher to understand their guidelines to be sure. More info about the IAB’s recommendations can be found here (page 8/9 here) and DoubleClick’s recommendations here.here

Google Confidential & Proprietary How much does DoubleClick Enabler add in file weight? As of April 2015, the Enabler adds approximately ~75KB (~25KB when gZipped).

Google Confidential & Proprietary Polite Load & Publisher Specs

Google Confidential & Proprietary Polite loading delays the loading of additional creative assets (like images and video) until the parent page has finished loading. This is different than ‘initial load’, which only refers to file size of the.html file in the Creative. It is helpful to implement the code for polite loading because many publishers have different specs for initial load versus the complete load size. More information about polite loading can be found here.More information about polite loading can be found here It’s important to check with the Publisher to understand their HTML5 specs for rich media ads because they should typically be different than Flash-based specs. Communication with Publishers is important because they may or may not count file size based on the compressed gzip format and will rather count the raw file size. It's also important because individual publisher specs differ from IAB specs depending on placement, ad type, etc. so they may allow more or less leeway in build specs. Publishers may also limit specs for animation and video play time. Polite Load & Publisher Specs

Google Confidential & Proprietary Images

Google Confidential & Proprietary Is the graphic a gradient or a solid color? Consider creating the image with just CSS3 to both improve the quality and reduce file size. ●CSS3 Gradient GeneratorCSS3 Gradient Generator 300x250 image as JPG: ~4KB 300x250 image as CSS3: Less than 1KB

Google Confidential & Proprietary Is the image comprised of solid colors or a vector? Use SVG (Scalable Vector Graphics) whenever possible instead of an image. Images are pixel based (“raster”) and may add some overhead in file weight. In contrast, SVGs are point-to-point based graphics (“vector”) and can greatly reduce file size. ●W3School's SVG TutorialSVG Tutorial ●How to Use SVGsHow to Use SVGs ●Compressing SVGsCompressing SVGs Image saved as PNG: 33KB Image saved as SVG: 21KB

Google Confidential & Proprietary Does your Creative use multiple icons? Use icon fonts whenever possible instead of an image for icons, images are pixel based and may add some overhead in file weight. Icon fonts are actually regular fonts and can be used in the same way as any other font in HTML. They are vector based as well. Custom icon fonts are relatively quick to create and implement. ●Icomoon Icon Font CreatorIcomoon Icon Font Creator ●NounProject: an affordable resource to gather SVG icons for your icon fontNounProject

Google Confidential & Proprietary Do you have multiple images in your project? If pixel based images are required, consider using a Sprite Sheet. A single tiled image that is loaded once, and with CSS, only individual tiles can be made visible, this approach can save making multiple requests over HTTP. Compressing the image, is still key even with this approach. ●CSS Image SpritesCSS Image Sprites ●Online Sprite Sheet and CSS CreatorSprite Sheet and CSS Creator

Google Confidential & Proprietary Are you using JPGs or PNGs in your project? If pixel based images are required, compress them as much as possible while keeping quality. Many people are already familiar Photoshop’s Save For Web, but there are other online tools that can compress an image even further while retaining quality. Photoshop’s Save For Web ●TinyPNG: Online PNG CompressorTinyPNG: Online PNG Compressor ●TinyJPG: Online JPG CompressorTinyJPG: Online JPG Compressor PNG using Save For Web: 57KB PNG using TinyPNG: 15KB

Google Confidential & Proprietary CSS and Animations

Google Confidential & Proprietary Consider using CSS3 animations (transitions/transforms) instead of Javascript for animations. CSS transforms use the GPU instead of the CPU for rendering animations so it helps with performance and preserves file size.CSS3 animations Refrain from using JavaScript libraries/frameworks that use the setInterval JavaScript method for animations, and if hand coding then do not use the setInterval method. This method uses up a lot of the browser’s resources and affects performance, and it requires a decent amount of code. If JavaScript animations are mandatory, then consider using the requestAnimationFrame method, it is specifically made for animations. ●Using requestAnimationFrameUsing requestAnimationFrame ●CSS vs Javascript AnimationsCSS vs Javascript Animations Before uploading your CSS files to Studio, consider minifying your CSS with an Online CSS Minifier. Online CSS Minifier CSS and Animations

Google Confidential & Proprietary Javascript

Google Confidential & Proprietary Are you using jQuery? Don’t use jQuery in your HTML5 Creatives. jQuery is not recommended because it adds unnecessary file weight (~75k) even though the majority of the jQuery library is not utilized in a Creative. Consider using pure Javascript with this guide, or using Zepto.js if necessary.this guideZepto.js

Google Confidential & Proprietary Are you using a Javascript Framework? Ask yourself if it is completely necessary to have them in your Creative. Consider taking pieces out of the framework and utilizing them in your main Javascript file to reduce overhead.

Google Confidential & Proprietary Are you targeting code for specific devices/browsers? Ensure your code is written for devices/browsers specified, no need to add code for non-supported devices/browsers. ●Browser and device support for DoubleClick StudioBrowser and device support for DoubleClick Studio ●Can I Use: Up to date browser support for JS and CSS propertiesCan I Use

Google Confidential & Proprietary Did you compress your Javascript?* There are online tools that will remove comments and extra whitespace from your Javascript. It’s a best practice to keep a version of your uncompressed Javascript file locally on your computer for later reference.online tools Keep in mind that in DoubleClick Studio, JavaScript files require a.js extension, not.min.js. If you minify JavaScript files, you can't add tracking easily. If the client requests minifying, add tracking first and minify the.js file later. *GWD natively minifies files, so if you’re using GWD no minification is necessary.

Google Confidential & Proprietary Optimizing Google Fonts

Google Confidential & Proprietary Optimizing Google Fonts If you are using a font other than the standard web fonts, consider using Google fonts. Google has a large library of fonts which can all be used for free. In order to reduce file size, be sure to only request the characters you need from the font vs the entire typeface. This is called Font Subsetting.Google fonts ●Optimizing Font RequestsOptimizing Font Requests