Accelerated Mobile Pages Advertisement and Cascading Style Sheet Merging

Similar documents
Preferential Resource Delivery Via Web Proxy or Web Browser

Notification Features For Digital Content In A Mobile-Optimized Format

DYNAMICALLY CACHING VIDEO CONTENT BASED ON USER LIKELIHOOD OF INTERACTING WITH CONTENT ELEMENT

Automatically Generating and Rendering Native Advertisements

Introduction to WEB PROGRAMMING

Displaying web pages within a software keyboard

How to lay out a web page with CSS

Web Design Course Syllabus and Course Outline

Styles, Style Sheets, the Box Model and Liquid Layout

CREATING A WEBSITE USING CSS. Mrs. Procopio CTEC6 MYP1

Chapter 1 Introduction to Dreamweaver CS3 1. About Dreamweaver CS3 Interface...4. Creating New Webpages...10

Assignments (4) Assessment as per Schedule (2)

MRK260. Week Two. Graphic and Web Design

Web Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh

Dreamweaver CS4. Introduction. References :

All Adobe Digital Design Vocabulary Absolute Div Tag Allows you to place any page element exactly where you want it Absolute Link Includes the

Cascading Style Sheets for layout II CS7026

Web Development IB PRECISION EXAMS

MODULE 2 HTML 5 FUNDAMENTALS. HyperText. > Douglas Engelbart ( )

Page Layout Using Tables

CompuScholar, Inc. Alignment to Utah's Web Development I Standards

The Benefits of CSS. Less work: Change look of the whole site with one edit

Analysis of Hypertext Isolation Techniques for Cross-site Scripting Prevention. Mike Ter Louw Prithvi Bisht V.N. Venkatakrishnan

Themes and Master Pages

RC Justified Gallery User guide for version 3.2.X. Last modified: 06/09/2016

HTML CS 4640 Programming Languages for Web Applications

E , Fall 2007 More with stylesheets

epromo Guidelines DUE DATES NOT ALLOWED PLAIN TEXT VERSION

Tutorial 1 Getting Started with HTML5. HTML, CSS, and Dynamic HTML 5 TH EDITION

CITS1231 Web Technologies. Introduction to Cascading Style Sheets

Dreamweaver Domain 5: Organizing Content by Using Dreamweaver CS5

INTERPOLATED GRADIENT FOR DATA MAPS

CSS for Page Layout Robert K. Moniot 1

HTML and CSS a further introduction

HTML TIPS FOR DESIGNING.

"METHOD FOR IMPROVED BANDWIDTH UTILIZATION IN DATA DOWNLOADING SYSTEMS USING INTELLIGENT DYNAMIC CONNECTION LIMIT STEPPING"

HTML+ CSS PRINCIPLES. Getting started with web design the right way

Block & Inline Elements

ECPR Methods Summer School: Automated Collection of Web and Social Data. github.com/pablobarbera/ecpr-sc103

Understanding the Web Design Environment. Principles of Web Design, Third Edition

Using CSS in Web Site Design

Unveiling the Basics of CSS and how it relates to the DataFlex Web Framework

Designing for Web Using Markup Language and Style Sheets

c122sep2914.notebook September 29, 2014

How to lay out a web page with CSS

BOP101. Becoming a Blackboard Content Editor Power User. The Content Editor Interface. Technology Training & Multimedia Development

HTML & CSS. SWE 432, Fall 2017 Design and Implementation of Software for the Web

BIM222 Internet Programming

1.1 Customize the Layout and Appearance of a Web Page. 1.2 Understand ASP.NET Intrinsic Objects. 1.3 Understand State Information in Web Applications

Web Design, 5 th Edition

Discuss web browsers. Define HTML terms

INFORMATICA GENERALE 2014/2015 LINGUAGGI DI MARKUP CSS

Flash Ads. Tracking Clicks with Flash Clicks using the ClickTAG

HTML. Based mostly on

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

STORAGE AND SELECTION OF CELL MARKERS

HTML + CSS. ScottyLabs WDW. Overview HTML Tags CSS Properties Resources

GRAPHIC WEB DESIGNER PROGRAM

INTRODUCTION TO CSS. Mohammad Jawad Kadhim

TIME DILATION CONTROLS FOR CAMERAS

Chapter 9. Web Applications The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill

HTML and CSS COURSE SYLLABUS

What is CSS? NAME: INSERT OPENING GRAPHIC HERE:

Deccansoft Software Services

Programming in HTML5 with JavaScript and CSS3

Study Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo

Introduction to HTML and CSS. Arts and Humanities in the Digital Age 2018 CHASE DTP Dr. Paul Gooding

Reading 2.2 Cascading Style Sheets

Selecting native ad units using gestures

An Eye Tracking System For Smart Devices

Using Dreamweaver CS6

SSD Admission Control for Content Delivery Networks

Chapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21

DETECTION OF POSITION FIXED CONTENT ITEM SLOTS AND CONTROL OF CONTENT DISPLAYED THEREIN

Optimize Online Testing for Site Optimization: 101. White Paper. White Paper Webtrends 2014 Webtrends, Inc. All Rights Reserved

Vehicle To Android Communication Mode

1. Please, please, please look at the style sheets job aid that I sent to you some time ago in conjunction with this document.

Web Development & Design Foundations with HTML5, 8 th Edition Instructor Materials Chapter 3 Test Bank

PARTIAL CLICK PROTECTIONS FOR ADS

ADOBE 9A Adobe Dreamweaver CS4 ACE.

Transferring online formatted HTML layouts into Flash and PDF

Header. Article. Footer

Secure web proxy resistant to probing attacks

Eng 110, Spring Week 03 Lab02- Dreamwaver Session

Foundation of Web Goal 4: Proficiency in Adobe Dreamweaver CC

Designing and Developing a Website. December Sample Exam Marking Scheme

PART COPYRIGHTED MATERIAL. Getting Started LEARN TO: Understand HTML, its uses, and related tools. Create HTML documents. Link HTML documents

HTML5 and CSS3 for Web Designers & Developers

Learning Adobe DreamWeaver CC. Module 1 Contents. Chapter 1: Introduction to DreamWeaver CC

HTML/CSS Lesson Plans

Co. Louth VEC & Co. Monaghan VEC. Programme Module for. Web Authoring. leading to. Level 5 FETAC. Web Authoring 5N1910

Interactive Media CTAG Alignments

Scripting for Multimedia LECTURE 1: INTRODUCING HTML5

Here Scripts. Writing An HTML File With A Script

How to lay out a web page with CSS

Intelligent Generation of Physical Products

Using Development Tools to Examine Webpages

Overview 14 Table Definitions and Style Definitions 16 Output Objects and Output Destinations 18 ODS References and Resources 20

BUFFERING AND INSERTING TEXT INPUTS

Introduction to HTML & CSS. Instructor: Beck Johnson Week 2

Transcription:

Technical Disclosure Commons Defensive Publications Series March 06, 2017 Accelerated Mobile Pages Advertisement and Cascading Style Sheet Merging Richard Rapp Justin Lewis Follow this and additional works at: http://www.tdcommons.org/dpubs_series Recommended Citation Rapp, Richard and Lewis, Justin, "Accelerated Mobile Pages Advertisement and Cascading Style Sheet Merging", Technical Disclosure Commons, (March 06, 2017) This work is licensed under a Creative Commons Attribution 4.0 License. This Article is brought to you for free and open access by Technical Disclosure Commons. It has been accepted for inclusion in Defensive Publications Series by an authorized administrator of Technical Disclosure Commons.

Rapp and Lewis: Accelerated Mobile Pages Advertisement and Cascading Style Sheet ACCELERATED MOBILE PAGES ADVERTISEMENT AND CASCADING STYLE SHEET MERGING Accelerated mobile pages (AMP) offer a better user experience by improving load times for pages linked to from search results by sending a version of those pages, optimized for mobile devices, along with the search results. This is particularly useful in places where latency may be high, such as in emerging markets with poor cell infrastructure and less capable hardware. While this approach has been successful at reducing load times, one of the challenges is incorporating ads within the AMP. Traditionally, ads are served in inline frames (also known as iframes ) embedded within a web page. This allowed the ads to be sandboxed from the rest of the page s content. Once the page loaded, the iframes would attempt to load ads within them. However, this goes against the general spirit of AMP, which attempts to have the page entirely loaded before the user attempts to display it. The traditional iframe approach would mean that the page would display instantly, but ads on that page could take several seconds to appear, providing a poor user experience and simultaneously lowering the effectiveness of those ads. One approach that can be used to solve this issue is to embed the ads directly into the page without an iframe. Attempting to eliminate iframes overall is a high order goal that would greatly improve loading times, while introducing a few challenges. This would allow the ads to load as if they were a natural part of the page itself. This solution fixes the initial issue, but introduces others. By embedding the ad content directly into the page, the sandboxing mentioned above is eliminated. One of the potential problems that would arise from the elimination of the sandboxing is the potential for cascading style sheets (CSS) name collisions. Published by Technical Disclosure Commons, 2017 2

Defensive Publications Series, Art. 414 [2017] CSS is used to provide formatting and styles to elements on a web page. This is typically done by defining CSS classes, each with a different name, that are applied to the page they are formatting. CSS is ubiquitous on modern web pages, and also heavily used to format ads creatives. When loaded in an iframe, the CSS of an ad only applies to that iframe, and the CSS of the page the iframe is in does not apply to the contents of the iframe. When the iframe is eliminated, CSS used in both the ad creative and the content page would apply to the entire resulting document. In some cases, this would not cause issues. However, there is a strong potential for overlap. Previously, when ads were directly inserted into the page, they were first party ads, or at least added directly by the publisher, so conflicts would be removed manually. However, since in this case the content page and the ad creative are built by entirely different entities (a publisher and an advertiser) who are unaware exactly what ad will be on their page or what page their ad will serve on, a common name for something (e.g., TitleText ) could be used as the name for a CSS class in both the content document and the ad creative. Even if the content page and an ad within it do not conflict, it is even more likely that a two separate ads within the same content page would share a CSS class name, also resulting in a collision. Attempting to apply both CSS classes to the resulting AMP document would have unpredictable results that would at least cause the page to display incorrectly, and at worst could cause the page to be completely unusable. Furthermore, since ads are usually inserted as the result of an auction, the pairing of an ad to a content page is not consistent, which could prove extremely difficult to debug. The present technique includes a mechanism for cloaking CSS rules in accelerated mobile pages so that they can be embedded within the web page without interfering with the page s layout and without using iframes to separate the elements. With the present technique the 3

Rapp and Lewis: Accelerated Mobile Pages Advertisement and Cascading Style Sheet display ads shown on the page will be able to be embedded within the page contents itself. Additionally instead of simply using a full image the AMP ads can be composed of CSS markup so that they are significantly smaller and have interactive features (such as clickable and non/clickable regions) or scaling properties. The present technique reduces not only latency and network traffic but also the total size of the embedded page. Reducing the size of the embedded page is especially useful because in the AMP protocol several pages are sent down to the client before the user chooses to click on them. Further since the contents of the page are mostly text the images tend to take up most of the pages memory size. The present technique is different from standard CSS cloaking in that it prevents collision between CSS rules from multiple sources as opposed to simply obfuscating the CSS. In fact, in some implementations of the present technique, the CSS may not be obfuscated at all. The present technique can prevent CSS collisions from occurring even when several documents are merged together (which happens to be the case when a single AMP page includes multiple display ads). With the present technique, multiple documents are merged so that a single new document is produced with the combined page s contents. This is different from how ads are embedded on web pages today where they use iframes (or similar) to keep the individual elements sandboxed. The present technique includes parsing a host AMP document to identify a collection of pre-existing CSS rules and a collection of other documents that should be merged into it. The collection of other documents can be identified by specific tags within the hypertext markup language (HTML). There are two key ways that these tags are used: they can directly identify the other document that should be included and where it should be included or they can indirectly identify another document, such is the case with the tag which only says to include an Published by Technical Disclosure Commons, 2017 4

Defensive Publications Series, Art. 414 [2017] advertisement with no specification as to which advertisement. Once the document is parsed then the list of CSS rules are put into a hash-map and the same process repeats for each of the other discovered documents (using the same hash-map). Every time a CSS rule is added to the hash-map, the rule is rekeyed based on the contents of the hash-map and the document from which it surfaced. There are a few variations for how this renaming process can work. In one implementation each of the CSS elements are renamed so that their name includes a local identifier for the document as well as the original name. So for example the video-player class in the host document might be renamed to host--videoplayer. More optimized server side implementations of this process may rename the CSS elements so that they are shorter. This optimization will significantly reduce the size of the page being sent to the user device. In this variation every new CSS rule is given an incremental name. CSS rules with names from different documents also have incremental names so that the name doesn t match the name in the other document. After the CSS names have been added to a hash-map (keyed by the name and document ID) the document containing them is processed so that all of the original names are replaced with new CSS names. Finally after each of the documents has been modified they are merged together. Usually this means inserting one document directly into the tag of the html of another document. There are some interesting exceptions that have to be followed. For example some tags are special constants used ubiquitously across all web pages (such as div, span, etc.) These tags can be ignored as long as CSS rules don t create references to those tags as independent assets, or in the case that they do new classes can be added to the document and to specific instances of these tags to differentiate between the tags in each document. 5

Rapp and Lewis: Accelerated Mobile Pages Advertisement and Cascading Style Sheet This process can be done on either the client or the server. In some optimizations this process can be done by both the client and the server to achieve the lowest possible latency and highest range of dynamic ad selection. Figure 1 Figure 1 shows HTML tags and CSS associated with an AMP host page and an advertisement page. As discussed above, the CSS rule for video-player is used by both the host page and the advertisement page. This could lead to collisions, where the max-width rule associated with either the host page or the advertisement page would be over-written. As a result, the host page or the advertisement page could be rendered incorrectly. Published by Technical Disclosure Commons, 2017 6

Defensive Publications Series, Art. 414 [2017] Figure 2 Figure 2 shows merged host and advertisement pages using the techniques discussed above. In particular, names of CSS elements (e.g., video-player ) are renamed to reflect the document that these CSS elements originated from. For example, the CSS element videoplayer in the host page, a first ad page, and a second ad page is renamed host--video-player, ad1--video-player, and ad2--video-player, respectively. As a result, there is no collision between the CSS elements. 7

Rapp and Lewis: Accelerated Mobile Pages Advertisement and Cascading Style Sheet Figure 3 Figure 3 shows an example in which a host and ad pages are merged in a manner discussed above. In particular, the CSS element names have been abbreviated and shortened, resulting in a reduced page size. Even though the CSS element names are abbreviated, the names themselves are still unique between the documents, and do not affect the rendering of the merged page. Published by Technical Disclosure Commons, 2017 8

Defensive Publications Series, Art. 414 [2017] Abstract This document describes a technique for cloaking cascading style sheet rules in accelerated mobile pages so that they can be embedded within a web page without interfering with the page s layout and without using inline frames to separate rules. With the present technique display advertisements shown on the accelerated mobile pages will be able to be embedded within a host page contents itself without causing any conflicts due to same rule names used on a host page and an advertisement page. Additionally instead of simply using a full image the advertisement accelerated mobile pages can be composed of cascading style sheet markup so that they are significantly smaller and have interactive features (such as clickable and non/clickable regions) or scaling properties. The present technique reduces not only latency and network traffic but also the total size of the accelerated mobile pages. 9