Search Logger
Archives for August, 2010.

Archive for August, 2010

Add-on Performance part 2: Helping consumers make informed decisions

8:27 pm - August 31, 2010 in IEBlog

The platform previews show the focus in IE9 on performance, interoperable HTML5 through same markup, and hardware acceleration. We’ve also posted here about the work we’ve done with add-on developers, and we shared some data about add-on performance and how we measure it.

In this post, we cover more of our thinking about measuring add-on performance and how to help consumers to stay in control of their browsing experience.

Add-on Performance and Site Performance

We’ve written about the different dimensions of performance in the web platform. We have also talked about the role add-ons play in overall browser performance. Site developers want a reliable, fast platform to run their web sites. Consumers (site visitors) want a reliable, fast experience of those sites. The perception of site speed includes the user’s experience of the site, the browser, and the installed add-ons.

As discussed in Add-on Performance part 1, add-ons can have a material impact on site performance and the consumer experience. Our goal with IE is that users have everything they need to make informed decisions and remain in control of their browsing experience.

Measuring performance to inform decisions

It is important that people stay in control of their browsing experience. This includes many aspects of using the browser including downloads, privacy, security, and controlling which add-ons to use. The ideal experience allows people to have exactly the add-ons they want – no more no less.

For users, there is a basic cost to benefit decision to make with add-ons. To make an informed decision, the user needs to have a clear view on the costs of the add-on as well as the apparent benefits. Most people understand the benefit they get from using an add-on they choose to install. It is more difficult to understand the full cost that add-ons bring to your browsing experience in terms of performance, responsiveness, and reliability.

When we introduced Web Slices, Accelerators and updates to search providers in IE8 we started a pattern of making sure that people are in control of the add-on capabilities in their browser. These types of declarative add-ons do not have performance or reliability costs to the browsing experience. The main impact they have is taking up space in the favorites bar or right click menu. Sites can promote web slices or add-ons, and the user is in control to decide whether to add them or not. This is an important part of the add-on experience even for savvy users; namely that people must consent to have the add-on.

For the types of add-ons that do have a potential performance and reliability cost (toolbars and BHOs), the user needs additional information. IE8 users can see the load time for add-ons in the Manage add-ons dialog. This is a good start, but there is more IE can do to help people fully understand the impact an add-on has on browsing performance.

Ideally IE would measure both load time and the additional time it takes to navigate to sites (navigation time). Measuring this time for every navigation, including the first time the add-on runs, is crucial because it represents how long the user actually had to wait to load IE and navigate to their favorite sites on their PC.

An important part of informing users is providing a threshold to understand the impact of add-ons have on performance. No matter what hardware you’re running on - from low end netbooks which throttle the CPU for long battery life or high end gaming desktops – human perception thresholds don’t change. Several studies regarding website response time report that users notice any delay over 0.2 seconds. Actions that are faster than 0.2 seconds appear instantaneous.  Scenarios with response times slower than that threshold can feel “slow” to users. Of course, the individual person should be free to choose a different threshold that matches their particular browsing needs.

When considering the performance of add-ons, it is useful to do so in relationship to this threshold. People think about the speed of actions in the browser, like opening a new site, rather than the speed of individual add-ons, so what matters to the user is the total amount of time taken by add-ons. From the user’s point of view, they don’t care if it’s one add-on taking 2 seconds or 10 add-ons each taking 0.2 seconds. Informing users means providing the visibility on everything that is contributing to the performance they experience, with enough detail that the user stays in control. With this information people can make decisions about individual add-ons in the context of all the other add-ons that they’re running.

A personal decision

In part 1 of this series we shared statistical data about add-on performance which is compiled from people who opt into sending telemetry. Because this data is anonymous it’s useful for spotting broad trends and working with add-on partners but it’s not useful for helping a specific person in their environment. What matters to a person is what happens on his or her own machine. So, they need data that’s specifically about their add-ons on their machine with their browsing habits; purely local data. This enables them to make the most informed decision about the add-ons they use and to stay in control over their browsing experience

With this information, the user can make an informed choice. They understand the value of the add-on features and the performance implications. People may decide that an add-on is so valuable that they’re willing to wait a ¼ second or even a ½ second during their browsing. People may also decide that they don’t utilize the features of a particular add-on frequently so they disable it until they want it. Consistent with other browsers, IE makes re-enabling add-ons easy through the Manage add-ons dialog. The most popular entry point is in the right-click menu of the command bar but it can also be accessed from the tools menu, the right click menu for a page (under accelerators), the search box dropdown menu (under search providers), windows control panel and of course from the options dialog. Microsoft doesn’t share information with developers about individual users disabling or enabling add-ons in keeping with our privacy policy. Using add-ons is a personal choice, so IE never automatically enables or disables an add-on – the user is in control and they choose which to enable and which to disable. IE gives people the information they need to make an informed decision.

More details for add-on developers

For background, we’ve talked about using windows tools to measure load and navigation performance of add-ons. Here’s more detail about the load and navigation measurements so add-on developers can test the performance of their products or do something more like build capabilities into their products to detect when browsing is slowed and tune the add-on experience appropriately.

Add-on Load time (Load Time)

IE8 measures load time when a new tab is created and IE initializes all enabled add-ons (and IE9 will do this too). IE calls CoCreateInstance(), ShowDW() and SetSite() for each add-on. In IE8, an add-on’s load time is the total time it takes to return from the CoCreateInstance() and SetSite() calls. In the future, we’ll also measure the ShowDW() function call.

Webpage Navigation (Navigation Time)

Earlier in this post, we talked about the importance of measuring navigation time. Here’s how we do it on the IE team and how we recommend add-on developers do it. An add-on’s navigation time is the time it takes to handle the following three DWebBrowser2 events while navigating to a webpage:

  • BeforeNavigate
  • NavigateComplete
  • DocumentComplete

We start measuring a navigation time for all enabled add-ons once IE fires a top-level BeforeNavigate event.

Sites may cause several navigation events to fire as they download images or content in frames. So, we keep an open tally of the time the add-ons take for each event on that page until the user:

  • Navigates (another top-level BeforeNavigate)
  • Cancels the navigation
  • Closes the tab
  • Closes IE

Once that occurs, we append the navigation time data point for each of the add-ons to the list.

When showing the load or navigation time data to users, we average up to the last 10 data points. We don’t measure the performance of disabled add-ons since they aren’t running or taking any time to load or navigate. Instead we show the latest data we have in parenthesis to inform the enable decision for people.

In everything we do including add-on performance measurement, IE treats all add-ons from all developers the same. Only the user makes decisions to enable or disable add-ons.

Thanks,
Herman Ng

Edit on 8/31 - replaced ExtensionShowDW with ShowDW() and refer to it as a function call rather than an event in 'Add-on Load time (Load Time)' paragraph.  Also removed extra period.

 

Get design tips to boost the impact of your display ad

6:34 pm - August 31, 2010 in Inside AdWords

While the right text and placement of your display ad are always crucial, you should also make sure that your ad is well designed. But how exactly can you ensure that your ad stands out on a web page, looks professional and is consistent with your overall brand message?

On Thursday, September 2nd, we’ll be holding a short one-off live course on effective display ad design. The session will give you a set of practical design tips including key insights on using color, font and images. The focus will be on the Display Ad Builder tool, although the tips are applicable to display design in general. The course is suitable for anyone interested in display advertising.

The course will be held on Thursday, September 2nd at: 3pm - 4pm BST / GMT+1 (London), 10am-11am EDT (New York), 7am-8am PDT (San Francisco).

Sign up here to attend.

 

Upcoming Free Webinar: Increase ROI with Enhanced CPC

4:41 pm - August 31, 2010 in Inside AdWords
A couple weeks ago, we announced the launch of Enhanced CPC, a new automatic bidding feature designed to increase your conversions and return on investment in your Max CPC campaigns.

We’d like to invite you to a free webinar hosted by members of the product development team to learn more about Enhanced CPC. Specifically, we’ll discuss:
  • How Enhanced CPC works and benefits your campaign performance
  • How Enhanced CPC complements your current bidding strategy, including 3rd party bid management solutions
  • Key differences between Enhanced CPC and Conversion Optimizer and how to select the best bidding option for your campaign
Register here for the webinar to be held on September 8 at 9:30am PST / 11:30am CST / 12:30pm EST.

Posted by Dan Friedman, Inside AdWords crew
 

Live Now: Yahoo! US Open Shortcut

3:56 pm - August 31, 2010 in Yahoo! Search Blog

The US Open is heating up on Yahoo! Search. This week we are launching the US Open Shortcut to help you find the information you want when you search for the championships.

Whether you’re a dedicated fan or just want to check out Maria Sharapova’s outfit, simply search for ‘US Open’ or your favorite player. You will find real-time scores and schedule of the day, news, photos and tweets. Did you know many tennis players love to tweet?
US Open

This is an exciting time for tennis fans: for the number one seed Rafael Nadal, who has never won the US open title, this can be finally his year. Or could the winner be Roger Federer, who won last week in Cincinati, his first title in seven months?

No matter who you’re rooting for, we hope you’ll use our Shortcut to follow coverage of the US Open.

Yuko Kamae
Yahoo! Search

 

August Search Trends: Kermit, McNuggets, and Back to School

3:33 pm - August 31, 2010 in Yahoo! Search Blog

It’s summertime and the livin’ is easy, but at Yahoo! Search we’ve been busy fielding queries about everything from Kermit the Frog to Zsa Zsa Gabor.

Early in the month US users showed interest in Ramadan, the month of fasting which began on the evening of the 10th. Searchers looked for the meaning of Ramadan, activities for children, and even “Ramadan text messages.” Searchers on Yahoo! also looked for biography, commercials for Ben Quayle, son of former VP Dan, as he takes the GOP congressional primary in Arizona.

Celebrities (and their children) continued to fascinate searchers throughout August, and we saw spikes in queries about Montana Fishburne’s adventures in adult entertainment, Tiger and Elin Woods’ pricey divorce, and the on-again-off-again relationship of Bristol Palin and Levi Johnson. Also on users’ radar were Lindsay Lohan’s release from rehab and singer Fantasia’s tumultuous personal life.

Human drama around the globe captured the attention of the many Yahoo! users who wanted more information about the catastrophic floods in Pakistan and the plight of the trapped Chilean miners. Searches for “map of Chile” jumped 60 percent in the last week of August, and searches for “trapped miner update” continue to spike through the past two weeks.

Drama of another kind was also popular as shown by the surge in searches for the McNugget rage video and for information about JetBlue flight attendant Steven Slater, whose show-stopping exit from flight 1052 may lead to a whole new career in reality television.

Yahoo! Mobile Searchers were busy this month, too, tapping in queries about topics ranging from floppy haired teen favorite Justin Bieber and the NFL preseason to more serious subjects including California’s Proposition 8 and the 14th Amendment of the US constitution.

As August ended, we saw searches about the 5th anniversary of Hurricane Katrina as well as in the upcoming hurricane season. Searches on Kermit the Frog spiked with the announcement that the original puppet will be displayed at the Smithsonian – proving that it is easy being green! And users who couldn’t wait for fall were already inquiring about back to school searches like lunch box recipes and costume ideas for Halloween. It’s not too early to plan for Halloween, even for the tiniest trick-or-treaters: searches for “baby Halloween costumes” spiked over 720% in August.

Can’t wait for our monthly recap? You can check out the weekly Yahoo! Trends segment on ABC News. This week, Yahoo!s Pamela Woon dishes on popular search topics like Puppy Tweet and the Emmys.

Check back often at the Yahoo! Search Blog’s Search Trends section to find out what’s buzzing on the web.

Mireille Majoor
Yahoo! Search Blog

 

Crop Marks Emerge on English Countryside

1:35 pm - August 31, 2010 in Yahoo! Buzz Log

by Mike Krumboltz

There's something odd going on in the United Kingdom. Unusual crop patterns are surfacing near Bradford Abbas, Dorset. But unlike most crop circle stories, this one doesn't involve rumors of visitors from another planet. This time the circles come from civilizations past.

The BBC hosts an intriguing article that helps to make some sense of the mystery. Thousands of years ago, there were prehistoric and Roman settlements across the English countryside. In the years since, crops have grown where the settlements used to be. Thanks to the crop marks, the settlements are never really gone.

English Heritage, an organization that "promotes and protects" the nation's historic environment, has remarked that these discoveries are being aided by this year's dry weather and the Icelandic ash cloud from several months back.

English Heritage senior investigator Dave MacLeod explains that "Cropmarks are always at their best in dry weather, but the last few summers have been a disappointment." This is the best summer since the drought of 1976 for viewing the marks.

Aerial photographs "show marks made when crops growing over buried features develop at a different rate from those nearby." Up close, they're impossible to see. But from the air, a pattern emerges.

Photos: See images of the crop marks.

Of course, the "discoveries" are really nothing more than faded lines, but they do offer a long-lost look into English history. Some crop marks reveal an outline of what was once a "lightly built defensive enclosure." Others reveal livestock enclosures, trackways, and field systems. 

Other popular Yahoo! stories:
Washington Post suspends columnist for Twitter hoax.
Tiger Woods snaps up NYC bachelor pad.
Plans for Gettysburg casino stir outrage.

Follow us on Twitter

 

Recalls, Rescues, Reversals: August 2010 Buzz

1:17 pm - August 31, 2010 in Yahoo! Buzz Log

by Vera H-C Chan

Eggs

Not everything was what it seemed this August, and we're not even talking about the Iraqi drawdown or the annual Mars hoax. Everyday staples like eggs harbored sickly bacteria, romantic vows became untangled, a "folk hero" regretted his actions, and a booted CEO found profit in disgrace. Even the groundswell of support for miners trapped 2,300 feet underground may not be what it seems. Below, the news that, by all appearances, triggered some further online digging.

Recalling the recall
As reported in an earlier post, 2007 may have been dubbed "year of the recall" too soon. These days, bad eggs sent searchers on Yahoo! scrambling for recall lot numbers to see if they harbored any infected products in their refrigerators. That wasn't the only call-backs, as warnings came out on tainted beef, too-hot GPS devices, and unhealthy medicine. After years of restraint, however, federal agencies now are being pumped up to crack down on companies with too many violations — perhaps starting on the offending egg farms with 8-foot tall manure piles.

Miners in limbo
In a year of workplace disasters, the Chileans miners' situation is at once good news and nightmarish. The good was that the 33 men survived a copper-gold mine collapse that trapped them 2,300 feet in the earth. The nightmare is how much longer these men must stay — at most optimistic two months, most realistically four months. By most accounts, including the miners' own, they are holding up as best can be expected, and one took the opportunity to propose a formal church wedding to his longtime partner. Yet as the world looks on upon this rescue effort, the miners and their families may suffer another survival issue: The San Esteben mining company, with its license suspended, says it can't afford to pay their salaries and the Chilean mining minister says labor laws prevent any government payouts.

No take-backs here
Three more case studies in the reversals department: Case One: Days after Bristol Palin and Levi Johnston (+3,613% in searches) announced their engagement, a hidden baby mama surfaced and ended the union. Now Johnston wants to take back his apology to his almost mom-in-law, and Palin will follow the Melissa Rycroft jilted route and work issues out on "Dancing with the Stars." Case Two: JetBlue attendant Steven Slater flirted with folk hero status after an on-the-job meltdown and emergency chute escape, but actually he really wanted his job. The JetBlue CEO may beg to differ. Case Three: The HP board made CEO Mark Hurd resign, after he settled a sexual harassment case, for dodgy expense reports. Disgrace so far has so far earned a $12.2 million exit package plus much more, and possibly another $30 million in stock sales.

Yahoo! August 2010 Web-Hot Searches


Search Terms with the Biggest Percentage Changes
  1. Egg Recall (off the charts). See above.
  2. Earnest Borgnine (+32.086%). The 92 year old actor will get a SAG Lifetime Achievement Award.
  3. Maksim Chmerkovskiy Girlfriend (+20,702%). His ex is Karina Smirnoff, but his newest dance partner will likely be Kirstie Alley.
  4. Maia Campbell (+18,127). A camera caught the "In the House" actress and daughter of the late novelist Bebe Moore Campbell possibly under the influence. She's currently in the same rehab facility as Lindsay Lohan .
  5. Sturgis Motorcycle Rally 2010 (+18,119). Celebrating No. 70 with a Rock'N'Rev Festival with bands like Guns N'Roses, Wolfmother, and Daughtry.
  6. Patricia Neal (+16,858). The Oscar winner, who starred in pivotal movies such as "Hud" and "A Face in the Crowd," died at age 84.
  7. Ms Universe 2010 (+16,397%). What can we say — it's officially Miss, but some prefer Ms.
  8. Salmonella Symptoms (+12,335%). With bad eggs and meat, people are sensitive about feeling queasy.
  9. Craigslist Killer (+12,047%). Philip Markoff, accused of killing a masseuse, committed suicide on August 15; now Lifetime wants to do a telepic.
  10. Prop 8 (+10,847%). A federal judge ruled the same-sex marriage ban in California as unconstitutional.

Biggest Search Terms
  1. Lindsay Lohan
  2. Miss Universe 2010
  3. Britney Spears
  4. Miley Cyrus
  5. Angelina Jolie
  6. Megan Fox
  7. Lady Gaga
  8. Elin Nordegren
  9. Kim Kardashian
  10. Jessica Simpson

Follow us on Twitter

 

Online publishers: growing the display advertising pie

12:00 pm - August 31, 2010 in The Official Google Blog
This is the latest post in our series on the future of display advertising. Today, director of product management Jonathan Bellack looks at our efforts to help online publishers generate more advertising revenue - Ed.

For millions of online publishers—from the smallest blogger to the largest entertainment, news, e-commerce and information sites—online advertising revenue is vital. When publishers can maximize their returns, everyone benefits from more vibrant online content and websites. But the pace of change in the industry can be intimidating—how can a publisher keep up with what’s new, let alone grow their business?

We believe that the new technology we’re developing to make display advertising work better will help to grow the display advertising pie for all publishers, by orders of magnitude. We shouldn’t be asking how publishers can eke another 5 or 10 percent out of display advertising in the next few years. We should be looking at how the industry can double or triple in size.

We’ve previously described our three core display ad products for publishers:
  • AdSense, which places the most valuable, relevant ads on our partners’ websites, without the publishers having to sell the ad space themselves;
  • DoubleClick for Publishers, our ad serving platform, which maximizes the value of ad space that publishers have directly sold themselves;
  • DoubleClick Ad Exchange, a real-time auction marketplace, which maximizes large publishers’ overall returns, by "dynamically allocating" the highest value ad, whether directly sold, or indirectly sold through an ad network.
I wanted to highlight the key principles guiding our future product innovations in this area, as we work to help all publishers maximize their online ad revenues.

1. Making life more efficient
For most large publishers, directly sold ads (ads sold by their own sales force) comprise the vast majority of their ad revenues. But today, selling and managing these ads is frustrating, expensive and often involves tedious manual processes.

Imagine a TV network that receives TV commercials in 100 different formats, languages, lengths and video dimensions, and then has to manually convert, translate and edit them all, then manually count the number of TV sets on which the ad appeared before sending a bill. Sounds crazy, right? Well, that scenario is far less challenging than what most large online publishers face today with display advertising. Today, across the industry, for every dollar spent on display advertising, 28 cents is eaten up in administrative costs. If we can reduce that proportion, it would mean a lot more money going to publishers.

Things like new standards for video ad serving and systems that connect buyers and sellers are helping publishers support the most engaging and creative ads across their sites. But there are quantum leaps to come in this area, for small and large publishers. Think of a political candidate who is seeking donations on his or her website—the candidate can receive money in seconds. Imagine if publishers—even the smallest website—had tools that enabled advertisers to click a button on their site to upload an ad, let them pay for it with a credit card, and then deliver this ad—through the publisher’s ad server—within minutes. This sort of “immediate ad” will become possible as ad serving technology continues to simplify the process of buying and selling ad space.

2. Total revenue management
AdSense selects the most valuable ad for publishers from a large number of ad networks, to maximize ad revenues every time a page loads.

New ad serving and “dynamic allocation” technology, like the DoubleClick Ad Exchange, is emerging that enables ad revenues to be maximized across both directly and indirectly sold ad space, ad impression by ad impression, using real-time prices. Second by second, across millions of ad impressions, this can meaningfully boost major publishers’ revenues. Using this technology, the average price that a publisher receives for ad space sold through the Ad Exchange is more than 130 percent higher than the average price of ad space sold directly to ad networks. In fact, without this type of dynamic allocation across sales channels, a publisher’s revenues can never truly be maximized.

In years to come, this true revenue maximization can get even smarter. There’s no question that delivering the right ad to the right user at the right time delivers better results. We have years of experience in doing this with search and text ads; we’re now bringing that experience to the world of display. This means investing in a smarter ad server that can automatically learn where and when a given ad will get the best response, as well as manage delivery to deliver those improved results for publishers. This new ad server can even anticipate a publisher’s future events and adjust delivery accordingly—for example, if traffic drops off every weekend, the ad server can automatically speed up during the week to keep everything moving smoothly.

3. More insight and control
Our vision is to provide all publishers the smartest possible advertising system that can give them knowledge and control of everything going on with their ad business. The vision is already becoming a reality: the upgraded DoubleClick for Publishers platform offers publishers 4,000 times more data than its predecessor. And in recent years, we’ve been constantly adding new reporting options for our AdSense partners.

By putting publishers in firm control and empowering them with more data, reports and controls (for example, over what advertisers and ad networks they allow), they’ll be able to make fully informed decisions about ad space forecasting, segmentation, targeting, allocation and pricing. This helps them to extract the maximum value from their sites and uncover new advertising opportunities—the gold that’s buried under their own sites.

4. Betting on openness
An open ecosystem drives meaningful results for publishers. When a wide range of buyers can bid for a publisher’s ad space, through an advertising exchange or network, this creates more competition for that ad space, while giving publishers choice over whose ads they want to appear. On the DoubleClick Ad Exchange, an enormous number of advertisers, belonging to over 50 ad networks, compete for publishers’ ad space. Of course, at the same time, we’re also providing publishers robust technologies and controls that can block any unwanted ads or networks.

Similarly, we believe that one of the best ways to encourage innovation is to open code to the web developer community. Look at the incredible mashups that have been created through the Google Maps API, or the range of mobile devices that have been created from our open source Android code.

This same approach can generate significant advantages for publishers. When we rolled out the upgraded DoubleClick for Publishers, we launched a new public API. This gives publishers and developers the tools to drive innovation and deliver value-adding “advertising apps” for publishers—like inventory analysis, sales workflow tools and more—without having to build an ad server from scratch. This will help drive the next generation of better, more valuable ad innovations.

5. Everything is going to be “display”
Display advertising is about much more than ads in web browsers. People are watching video, reading newspapers, magazines, books and listening to digital music at an ever-increasing rate. They’re turning to a plethora of new devices—smartphones, tablets, e-readers and even video game consoles. We’ve designed our platform, and are continuing to invest in it, to give publishers a single base that can deliver ads into this expanding world—including streaming video, mobile ad delivery and more.

Looking forward, what we call “display” today will just be “advertising”—a single platform that can coordinate an advertiser’s campaign across streaming audio ads in car stereos, interactive mobile experiences on smartphones, and HD video ads on set-top boxes. Imagine if that single platform could optimize the campaign, automatically delivering the best-performing ads, best returns and best mix, across all those platforms. That’s the future we envisage.

An exciting time ahead
We’re unapologetically optimistic about the future of display advertising for online publishers. There’s great innovation taking place in this area that will make the current landscape look primitive within a few years. We’ll keep working hard to help all publishers take advantage of these opportunities.

 

Melanie’s Match, Tina Fey’s Sneaks, Jennifer Grey’s Dancing Again: What’s the Buzz

11:56 am - August 31, 2010 in Yahoo! Buzz Log

by Claudine Zap

Tina Fey at the Emmys

Our top picks from the day's hottest searches.

  1. Melanie Oudin (Searches increased by 5,136%). The Georgia teen won her first match at the U.S. Open.
  2. Burning Man 2010 dates (+3,762%). The party in the dessert runs August 30 through September 3.
  3. Tina Fey (+2,368%). The Emmy-nominated actress cleaned up nice in her floor-length gown. Long enough, word is, to cover up her sneakers.
  4. Jennifer Grey (+995%). The "Dirty Dancing" star will do a turn on "Dancing with the Stars." Watch out, nobody puts Baby in a corner.
  5. Zucchini (+257%). Be sure to feast on this summer squash before the end of the season.

Follow us on Twitter

 

Getting Ready for SVG Open

10:34 am - August 31, 2010 in IEBlog

I recently demonstrated Test Driving Modern SVG using the SVG Dice sample currently on the Internet Explorer 9 Test Drive site. While building this sample, I learned that both performance and interoperability for SVG are a subtle continuum and are not binary. This point resonated with me so much that I modified my presentation for this week’s SVG Open Conference entitled “The Future of SVG and HTML5” to include methods by which the SVG developer community can rally around to make SVG more interoperable.

Testing SVG vs. Test Driving SVG

SVG has its roots in a document format. The most popular use case today is the static document format. Complex engineering diagrams and other illustrations are well suited for SVG given their requirements for scalability, high fidelity printing, and portability.

With HTML5, the future of SVG is about the next generation of the interactive graphic web which exercises SVG in new ways. As a community, we need to think about how we test the SVG specification differently.

Testing SVG

The W3C SVG Test Suites attempt to “test” the ability to implement the spec, but as we learned in the working group, this is not enough to guarantee an interoperable set where a developer can use the same markup that works across all browsers. The SVG Test Suite is not intended to test conformance, but rather whether or not the spec can be implemented. From the W3C SVG Test Wiki:

“Our test suites are necessary, but not sufficient, to test conformance… Thus, representations of tested support is skewed toward the more complex features of SVG, and is not an accurate view of overall SVG support”

In other words, the existing test suite doesn’t test whether a browser conforms to the spec. To this end, we are working closely with the SVG Working Group to help round out these tests; in fact, there is an external effort to create an SVG DOM 1.1 conformance test by the SVG Interest Group. At the time of writing, IE9 passes 100% of these automated tests. In concert with the SVG Working Group, we are helping to resolve these interoperability issues by continuing to enhance the SVG Test Suite through regular contributions.

Additionally, there exists an imbalance between the number of requirements in the modules in the SVG Specification, and the number of tests in the SVG Test Suite that represent those requirements. The Internet Explorer team helps to address this imbalance through test asset contributions. But this is not enough. We have contributed 56 tests and expect to continue to deliver more over time.

Test Driving SVG

The better measure of conformance and more importantly interoperability was do develop more complex SVG for the web. My own experience in test driving SVG by developing the SVG Dice demo illustrates some of the places where we have more work to do as a community on interoperability of SVG.

The SVG specification contains over 2000 individual requirements. This is a large number in comparison to other web specifications and means that there is plenty of room for different interpretations. We strive in the SVG W3C Working Group to identify these differences. When I developed the SVG demo with the requirement that it works across browsers, my eyes were opened to some of the difficulties web developers face.

Most of the interoperability issues stem from a combination of the large number of requirements, the dependencies on other specifications, and the lack of significant content on the web to ensure the features are interpreted the same by both developer and browser vendors alike. SVG is relatively new ground for web developers and whereas HTML and CSS have enjoyed decades of refinement by a large scale of users, SVG has not yet had the same level of use and scrutiny.

Now that SVG is a part of HTML5, we expect to see traditional web developers learning new and better ways to improve experiences for their users using vector graphics. At the last SVG Face to Face meeting, the SVG Working Group assembled scenarios for SVG that provide for more targeted use cases for the next generation, graphical web. SVG plays an integral role here.

Comparing Implementations

I wrote the SVG Dice demo from my own understanding of the specification using Internet Explorer 9 and subsequently tested it in other browsers. In most cases where I ran into conflicting behavior, at least two browsers still agreed. Sometimes Internet Explorer’s behavior matched Chrome or Safari, and other times it matched Firefox or Opera. Because Internet Explorer is the most recent implementation, it benefits from an SVG Specification that is in last call where at least some of the ambiguities and conflicts have been resolved in the specification. Clearly there are more.

Something that caught me off guard was the impact of performance on my development effort.

From a developer’s perspective, I wanted to use the same graphic features like opacity, gradients, and masks in all browsers, in order to provide a consistent interoperable user experience, but I couldn’t do that because of performance concerns. Fully hardware accelerated graphics on Windows helps to move these graphic intensive computations to the GPU. I added the “Low Fidelity” mode to enable users to experience this demo in browsers that don’t make full use of the GPU. One nice side effect is that this also demonstrates CSS styling of SVG.

The Surprising “Switching Event”

Debugging the differences between browsers caused a very interesting “switching event” for me as a developer. There were a few outstanding bugs in the IE9 debugging tools (now fixed) which prevented me from placing breakpoints in code when working with SVG, so I used the popular Firebug add-on for Firefox. However, running the demo on Firefox was too slow, so I reverted back to Internet Explorer 9 to debug.

I eventually found work-arounds for most of the incompatibilities without having to write browser specific code, but it required far more effort than expected or considered reasonable.  We have more work to do here as a community in building the promise of same markup for SVG.

The Code

Because SVG is an older spec but new to a lot of developers, I thought I would review some of the code and concepts in this demo up close.

The Document Structure

As a first example, most browsers do not yet support SVG in HTML5.  I had to structure the document as XHTML with inline SVG.

<!DOCTYPE html>
<html id="demohtml" xmlns="http://www.w3.org/1999/xhtml" class="testdrive">
<head>
<title>
SVG Dice
</title>
</head>
<body id="demobody" onload="Setup()">
<audio id="sndRemove" volume="1" src="assets/remove.mp3" preload="true" ></audio>
<svg overflow="visible" id="theSVG" xmlns=http://www.w3.org/2000/svg
xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" >
</svg>
</body>
</html>


The above simple <!DOCTYPE html> sets Internet Explorer 9 to run in “standards mode” where SVG is supported. Notice that the SVG is embedded directly into the HTML. Both the css and the script are linked in via the HTML elements as expected.

<script type="text/javascript" src="demo.js"></script>
<link rel="Stylesheet" type="text/css" href="demo.css" />

At this point I have my basic html and svg document, stylesheet, script file structures. Next I need to build the graphical elements, provide the styles and write the script necessary for the animations and user experience.

Adding the Content

One of the great benefits and unique nature of the web development community is what we called the “copy/paste” use case. Any developer can readily search Wikimedia for public domain SVG art and use these directly in their applications or on their sites. Other popular tools exist for generating new or modifying existing content, from the open source Inkscape which focuses specifically on SVG, to other graphic tools from Microsoft and Adobe which export to SVG. I used existing open source clip art for the dice and for the boat.

Initially I had kept these SVG sources in different files for the purpose of separation. Unfortunately, I ran into several different issues across browsers from sizing to SVG Images support, which forced me to include all of the SVG in the one HTML file.

SVG contains the concept of <defs>, which is used to define an element(s) with styles and attributes, that can be re <use>d later. These two concepts are very powerful. They allow me to create many different sized dice for use as the image on the cup, those that fall into the cup, or those that roll across the screen during game play. I organized the <defs> from the various files at the top document immediately after the SVG tag.

<defs>
<!-- for left die -->
<linearGradient id="grad21" x1=".445" x2=".554" y1=".442" y2=".555">
<stop stop-opacity=".9" offset="0" stop-color="#470808"/>
<stop stop-opacity=".9" offset=".65" stop-color="#700d0d"/>
<stop stop-opacity=".9" offset="1" stop-color="#8c1111"/>
</linearGradient>
</defs>

These <defs> are later referenced:

<!-- edges -->
<path d="M 2474 4434 L 4860 2945 C 5009 " fill="url(#grad21)"/>

Once the <defs> were in place and the main clipart content was inline, I designed the rest of the experience, keeping in mind that SVG renders in layers from top to bottom. The majority of the remaining content was the scoreboard, the felt, the text and the cup.

Adding the User Interactivity and Animations

One of the more challenging aspects of this demo was organizing the sizing. One of the first things I do in the code is register the resize event, and set up the dimensions of the <svg> and the contained svg fragments. For simplicity, I <g>rouped them so I can apply scaling and positioning individually.

document.getElementById("theSVG").setAttribute("width", surfaceWidth.toString() + "px");

Something to take notice of immediately here is that this JavaScript code is familiar to web developers because it is standard JavaScript working with the DOM. SVG has its own DOM methods which I use, but I mostly stick to DOM Level 2 constructs as there is general agreement in the SVG Working Group that the SVG DOM might need revisiting.

Next I needed to take both of the static dice as SVG Fragments, and create some code to clone them, store references in an array with properties that allow me to manipulate their transforms for the animation effects, as well as ensure the physics engine recognizes them accordingly. The loop to create the dice is straightforward; it loops through the number of dice desired, clones the original into the DOM and creates an array to manage them.

Note: Most code samples here are trimmed for brevity, but all of the code is on the Platform Preview site http://ie.microsoft.com/testdrive/Performance/SVGDice/Default.xhtml)

First I clone the prototype and add it to the DOM, setting some default attributes along the way. Note the establishment of the transform is used to move the dice (translate), rotate the dice (rotate) and size the dice (scale).

// create an instance of die #1 and add it to the SVG Doc
this.die1 = createElement("g");
var tmpChild = this.die1.appendChild(createElement("g"));
var tmpNode = this.die1.appendChild(tmpChild);
tmpNode.appendChild(nodeDie1.cloneNode(true));
// set some default attributes
this.die1.setAttribute("id", "die_1_" + number.toString());
this.die1.setAttribute("transform",
"translate(" + this.x.toString() + "," + this.y.toString() + ")
scale ("
+ this.scale.toString() + ")");


I wanted to make use of the <use> element here as this is a great way to clone a group of SVG fragments. Unfortunately, the implementation of <use> varies across browsers, specifically in the case of styling and events.

Next I use the SVGDOM getBBox() method to grab the dimensions of the die as we shrink each one along the way. This method returns an SVGRect which is used in the physics engine to detect collision.

var rectSize = this.die1.getBBox(); // calculate dimensions for use with physics
this.height = rectSize.height;
this.width = rectSize.width;

One of my favorite parts of building this sample was the discovery and use of the Box2DJS engine which made physics a breeze! This engine is used in many projects and is now available to web developers. Before I create the dice, I actually initialize the world around me:

function createWorld(width, height) {
var worldAABB = new b2AABB();

var world = new b2World(worldAABB, gravity, doSleep);
createGround(world, width, height);
// Side
createBox(world, 0, 0, 30, height);
createBox(world, width, 0, 30, height);
createBox(world, 0, 0, width + 30, 30);
createBox(world, 0,height , width+30,30);

return world;
}

And then during dice creation I add each die to the world and give it an initial velocity.

// add this dice to the physics engine
this.circleBody = createBall(world, this.xTrans, this.yTrans, this.width);
// give the force a slightly random starting velocity
this.circleBody.SetLinearVelocity(initialForce);

After adding some user interaction to add dice, I remove dice and shake the cup. Then, I create a timer and step the world.

timer = window.setInterval(DoStuff, 16);
// move the world
world.Step(timeStep, iteration);

The Die class has a prototype update function that is called when the world steps. The primary mechanism for moving the dice is to get the coordinates from the physics engine and set the transform property with all of the elements originally established:

var transFormString = "translate(" + Math.round(this.circleBody.m_position.x)
+ "," + Math.round(this.circleBody.m_position.y) + ") scale (" +
this.scale.toString() + ") rotate(" + Math.round(this.rotation).toString()
+ "," + Math.round(this.xTrans).toString() + "," +
Math.round(this.yTrans).toString() + ")";

We now have moving, rolling, colliding dice.

Note that using the transform attribute is not necessarily the fastest approach, depending upon the implementation. As mentioned previously, I shied away from the SVGDOM which provides methods such as setTranslate() and setRotate(). The method I chose here considers potential future use of CSS Transforms with CSS Transitions and/or CSS Animations.

Styling the Graphics

Lastly, I wanted to take advantage of SVG integrated into the DOM and use CSS to change the style of the scene. Since the original art came from a design tool, it contained RGB values for colors and opacities.

<linearGradient id="cgrad2c" x1="1" x2=".17" y1="0" y2=".58">
<stop stop-opacity=".9" offset="0" stop-color="#700d0d"/>
<stop stop-opacity=".9" offset="1" stop-color="#b51616"/>
</linearGradient>

I replaced these RGB values with styles:

<linearGradient id="cgrad2c" x1="1" x2=".17" y1="0" y2=".58">
<stop class="diceCorner6"/>
<stop class="diceCorner7">
</linearGradient>

This allowed me to create style sheets for each of these styles:

g#classHandler.vegas .diceCorner6 {stop-opacity:.9;offset:0;stop-color:#700d0d;}
g#classHandler.vegas .diceCorner6 {stop-opacity:.9;offset:1;stop-color:#b51616;}

g#classHandler.lowfidielity .diceCorner6 {offset:0;stop-color:#000000;}
g#classHandler.lowfidielity .diceCorner6 {offset:1;stop-color:#000000;}

And then set the one class property at the top of the document to change all of the styles in the document:

// set the overall stylesheet via class
document.getElementById("classHandler").setAttribute("class", style);

This allows the user to change the style sheet even while the dice are rolling as there is no difference to the DOM as to when these styles are changed. Hardware accelerated graphics in Internet Explorer 9 enable this to happen very quickly.

Call to Action

Start working with SVG in Internet Explorer 9. IE9 is platform complete for SVG in the latest platform preview release. Experiment with the feature set and tell us about incompatibilities or bugs you find using the “Report Issue” command and on Microsoft Connect.

The IE team is testing sites, libraries and other SVG content on the web. Our goal is to help authors with their content and find any bugs in our feature set. One important best practice is using feature detection, not browser detection when testing for SVG support. Help us find the places where developers are detecting specific browsers instead of testing for functionality, and make any changes to open source libraries, or contact content authors such that we can help fix any issues that may arise.

We’re excited to see web developers start using this technology and the next generation, graphically rich, websites built with SVG.

Patrick Dengler
Senior Program Manager
Internet Explorer

 
 
 
 
 
 
It's All About Search | © clsc.net |
2012.02.0421:07
Tech used here: Valid HTML - Valid CSS - Valid RSS - JavaScript - PHP - Smarty - MySQL - and a partridge in a pear tree.