File Under: Mobile

Google Boots Ad Blockers From Google Play Store

Google has pulled the popular Adblock Plus and other ad-blocking apps from the Google Play store.

To be clear, that means Adblock Plus and its ilk are no longer available for Android users. So far nothing has changed in the Chrome Web Store, which still hosts plenty of ad-blocking add-ons for Google’s web browser.

The move shouldn’t be surprising given that ad-blocking software cuts into Google’s bottom line, though that’s not exactly why Google says the apps were removed. The company says that such apps violate the Play Store’s terms of service, specifically that they cause “interference with another service or product in an unauthorized manner.”

Naturally if you’ve already installed AdBlock Plus — or any other affected ad-blocking app — it will continue to work, though there will be no more updates. For that reason, Wladimir Palant, creator of AdBlock Plus, suggests users “install our next release from our website once it is out.”

Palant calls the move “surprising” and wonders if it suggests “a course change at Google.” It doesn’t seem particularly surprising to me, but Palant’s thoughts on all the “for rooted phones only” apps currently available in Play seem well-founded:

Until recently the main distinction between Android and iPhone was that Android allowed you to install any app as long as it wasn’t malicious (meaning that it’s obvious what the app does). Google Play still allows apps stating “for rooted phones only” but I wonder whether these are next on the list to be removed — each of them performs “unauthorized actions”.

What’s really surprising is that Google ever allowed these apps in the first place.

File Under: Web Basics

Put Your Site on a Diet With Google’s Image-Shrinking ‘WebP’ Format

WebP versus JPEG. Click the image to see the full size examples on Google’s WebP comparison page. Image: Google

Webpages are constantly getting bigger.

Massive JavaScript libraries and endless sharing buttons aren’t helping, but the main culprit behind most of the bloat is the good old image. According to the HTTPArchive, images account for roughly 60 percent of total page size. That means the single biggest thing most sites can do to slim down is to shrink their images.

One way to do that is with alternate image formats like Google’s WebP, which can yield images between 25 and 34 percent smaller than more popular image formats. Despite the astounding space-saving potential of WebP it, like JPEG 2000 and other efforts before it, has not completely caught on with browsers.

So far only Google Chrome and Opera support WebP (both also automatically convert all images to WebP for their respective proxy browsing mobile services). Mozilla objected to WebP when it was first launched, but all of the issues raised in that post have been addressed as WebP has evolved. Firefox still does not support WebP. Nor does Internet Explorer.

However, as Opera’s Bruce Lawson recently pointed out, using some cutting-edge CSS wizardry you can serve WebP images to Chrome and Opera, while still offering JPGs to the rest. Here’s what the code would look like:

.mybackgroundimage {
    background-image: url("image.jpg");
    background-image: image("image.webp" format('webp'), "image.jpg");
}

This code uses the new Image Fallbacks syntax, which is part of the CSS Image Values and Replaced Content Module Level 4. The format qualifier is borrowed from @font-face and ensures that browsers won’t download the WebP image if they don’t support it.

Of course this only helps with CSS background images, which probably aren’t the majority of the images most sites serve up. For content images there’s currently no easy way to do the same thing, though there might be in the future if browsers begin to support the proposed <picture> element. Because <picture>‘s syntax is roughly analogous, you would be able to do something like this:

<picture>
    <source src=image.webp type=image/webp >
    <source src=image.png type=image/png >
    <img src=image.png alt="alt text "> <!-- fallback content -->
</picture>

That would cover almost all the bases: browsers that support WebP and <picture>, browsers that support <picture> but not WebP and browsers that support neither. Unfortunately it’s going to be a while before this pseudocode becomes real.

WebP has other problems worth considering before you dive in. For example, when users save an image they may have trouble getting a WebP image to open in their favorite desktop app.

Still, while WebP may have a little ways to go, the potential to significantly reduce page size appears to be winning converts. If you’d like to learn more about WebP and how you can use it, check out the video below from Google’s Making the Web Fast series.

File Under: Security, Web Basics

Google: Here’s What to Do if Your Website Is Hacked

Chrome’s malware warning page. Image: Google.

Nothing drives away your visitors quite like a message from Google that “this site may harm your computer” or “this site may have been compromised.”

Hopefully you’ll never need it, but if your site does get hacked Google has set up a new site dedicated to helping websites that have been hacked.

The “Help for Hacked Sites” section of Google’s Webmaster Tools offers up articles and videos to help you not only recover from compromising hacks, but take steps to make sure it doesn’t happen again.

Part of what makes hacked sites difficult to deal with is that oftentimes developers don’t even notice that they’ve been compromised. “Hacks are often invisible to users,” says Google in its new help section. “For example, unbeknownst to the site owner, the hacker may have infected their site with harmful code which in turn can record keystrokes on visitors’ computers, stealing login credentials for online banking or financial transactions”

Google has an 8-step program for unhacking your site, which include basics like identifying the vulnerability that was used to compromise your site, as well as how to request a review so Google will remove the dreaded “this site has been compromised” message from its search results.

For more info and all the details on what to do if you’ve been hacked, check out the new Help for Hacked Sites section of Google’s Webmaster Tools.

File Under: Browsers

Microsoft Reverses Windows 8 Flash Ban

Windows 8. Photo: Microsoft

Microsoft has, yet again, changed its policy regarding Flash on Windows 8 and Windows RT.

Starting today Microsoft is ditching the whitelist, allowing Flash in IE10 to run by default on almost any site that needs it.

Previously Microsoft had announced that Windows 8′s Metro mode would not support Flash. By the time Windows 8 actually launched that had changed to allow Flash to run on websites that Microsoft had formally whitelisted. Flash always ran unfettered in IE10 when using Windows 8′s desktop mode.

Now Microsoft is reversing the whitelist, blacklisting “the small number of sites that are still incompatible with the Windows experience for touch or that depend on other plug-ins.” According to the IEBlog that’s fewer than 4 percent of sites using Flash.

According to web survey company W3Techs, around 20 percent of all websites still use Flash in some fashion. The HTTPArchive puts that number somewhat higher at 35 percent in general, but 42 percent for the top 1,000 sites on the web. Unfortunately neither of those sources track whether or not Flash is an integral part of the sites that use it, or just used in advertisements on the site.

Whatever the case, despite the fact that the number of sites using Flash is declining, it’s clearly still a big part of the web.

Whitelisting every site on a site-by-site basis was cumbersome at best and often frustrating since sites that might have worked just fine could not simply because they had not made the list. Today’s change of heart for IE10 eliminates that problem and makes Windows 8 a bit more consistent, offering nearly the same Flash experience whether you’re in desktop or Metro mode.

File Under: Web Basics

Teachers Are the Key to Everyone Learning to Code

Code.org recently made a splash with its high-profile supporters — everyone from Bill Gates to Snoop Dogg have offered up their support for Code.org’s premise: that everyone should learn to code.

While Code.org’s goals are admirable, the movie above spends near zero time talking about what might be the most important part of the equation: computer science teachers.

The Code.org website has info for interested teachers, but the emphasis is still clearly on enticing students to want to learn to code. That’s great, but what about CS teachers?

To prepare for an upcoming talk at the annual Python conference, Pycon, Mozilla data architect and PostgreSQL contributor Selena Deckelmann recently started talking with actual High School CS teachers and has some surprising, if depressing, take aways about what we can do to help kids learn to code. Deckelmann’s survey is admittedly informal and rather small, but it’s a start.

Deckelmann reports that “reading comprehension is the biggest barrier to completion of AP Computer Science” and that “continued existence” is the biggest battle for a computer science teacher every year.

Deckelmann cites a 2010 report that found “the number of secondary schools offering introductory computer science courses dropped 17 percent from 2005 to 2009 and the number offering Advanced Placement (AP) computer science courses dropped 35 percent in that time period.”

More encouraging is that students at one high school learned three languages in three years (C++, Java and Python).

It’s also interesting to note that Deckelmann says “the CS teachers I’ve met want to share their lessons — with me and with other teachers,” and that “the CS teachers I’ve met don’t know other CS teachers.” That sounds like an opportunity for some kind of social site if anyone is interested — just be sure to talk to some actual teachers before you start building.

If you’re planning to be at Pycon this weekend be sure to check out Deckelmann’s talk “What teachers really need from us.”