Xah Web Dev Blog Archive 2011-01

HTML {html, head, body} Tags are Optional.

Update: CSS: multi-column (newspaper) Layout.

HTML5 Tutorial: figure, figcaption.

Update: CSS “pre” Problem: No Linebreak After Tag.

Another W3C validator annoyance. If you have a “p” tag inside “li”, it's considered valid. See bottom: W3C HTML Validator Invalid.

Internet Ad Fraud

A fascinating story.

Uncovering an advertising fraud scheme. Or “the Internet is for porn” By Panos Ipeirotis. @ http://behind-the-enemy-lines.blogspot.com/2011/03/uncovering-advertising-fraud-scheme.html

This guy, goes over thru tech details on a ad fraud scheme that makes $50k to $700k per month!

I spend 2 hours to read thru. You'll learn quite a few things. ① A detailed scene of online advertising and scams. ② Some of the actual names of ad networks. (if you are interested in monetizing your site. (but though some of them may be shady.)) ② Some of the web technologies.

W3C HTML Validator Invalid

CSS: Tabbed Menu and Implementing Tab Menu with JavaScript: Page A. Updated.

IE9 Renderer Crash (commentary on IE9 release)

Unicode Char Equivalence Support in Browsers

Humor: Motorola TV Commercial: Apple 1984

What Happens If Google Shut Down Your Account?

Google Chrome, SPDY Protocol, Browser War II

Reminder. If you like this blog, you might also enjoy my other programer related blogs:

Usually i don't repeat a article in more than one place, even if it's related to both.

My webhosting service provider is having a special for “1&1 MyBusiness Site”. Been using it for about 4 years. Never had a problem. I'm happy with the service. Sign up if you need web hosting. 1and1.com

Internet, Future, Old School Net Lingoes (commentary)

Today, your browser sends all sort of information. Even if you turn cookies off, or flash cookies off, you can still be identified. For example, your browser send out what font you have installed, your screen dimension, what plugins you have. If you turn off the “user agent” info in your browser, that makes you more unique. Wanna know what sort of info it sends? See: https://panopticlick.eff.org/index.php.

Google's search is going down the drain. Α new article from N Y Times describes a big incidence of SEO gaming involving J C Penney. Detail, examples, summary at: Google Search Problems; Alternative Search Engines.

Steven Levy, who writes books about Apple, now came out a book of Google

In The Plex: How Google Thinks, Works, and Shapes Our Lives By Steven Levy. amazon

Funny! Humor: Microsoft Bing Video Commercials

Discovered a book, by Tim Wu. Quote:

Tim Wu (traditional Chinese: 吳修銘) is a professor at Columbia Law School, the chair of media reform group Free Press, and a writer for Slate Magazine.[1] He is best known for coining the phrase network neutrality in his paper Network Neutrality, Broadband Discrimination,and popularizing the concept thereafter, leading in part to the 2010 passage of a federal Net Neutrality rule.[2][3][4] Wu has also made significant contributions to wireless communications policy, most notably with his "Carterfone" proposal.[5]

Wu's academic specialties are copyright and telecommunications policy. For his work in this area, Professor Wu was named one of Scientific American's 50 people of the year in 2006. In 2007 Wu was named one of Harvard University's 100 most influential graduates by 02138 magazine.[1] His book The Master Switch was named among the best books of 2010 by the New Yorker Magazine,[6] Fortune Magazine,[7] Publisher's Weekly,[8] and other publications.

On February 8, 2011 Columbia Law School announced that Professor Wu "[had] been named senior advisor to the Federal Trade Commission (FTC) for consumer protection and competition issues that affect the Internet and mobile markets."[9] He is scheduled to begin his new position, on February 14, at the FTC's Office of Policy Planning.[10] Professor Wu will take a leave of absence from Columbia.[11]

Wu's 2010 book The Master Switch: The Rise and Fall of Information Empires described a long "cycle" whereby open information systems becoming consolidated and closed over time, reopening only after disruptive innovation. The book was named one of the best books of 2010 by the New Yorker Magazine,[6] Fortune Magazine,[7] Amazon.com,[26] the Washington Post,[27] Publisher's Weekly,[8] and others.

The Master Switch: The Rise and Fall of Information Empires By Tim Wu. amazon

See also:

2 weeks ago i reported that the embed video code handed out by YouTube contains a invalid attribute type="text/html". Ι wrote about it here: Google and Amazon Generates Invalid HTML, and also asked about at stackoverflow.com, also posted the question to YouTube forum at Source www.google.com.

Amazingly, Google fixed it! Now the embed code no longer contains type="text/html". Yay!

Does JavaScript support Unicode in variable or function name? See: JavaScript Unicode support test

Google URL Shortening Service (technical; commentary)

There's this tweet going around the net:

So this SEO copywriter walks into a bar, grill, pub, public house, Irish bar, bartender, drinks, beer, wine, liquor, four loko. — Victor Haffling (lahaff) 2011-01-06

The original author of this joke is Victor Haffling (lahaff), on . Screenshot of his tweet: 1163×902, and he confirmed it on Twitter.

What's the percentage of web browsers with JavaScript turned off?

That's a hard question to answer. Google Webmaster Tools doesn't have it. Google Analytics doesn't answer it. Web statistics sites don't have the info. Because, it's something you have to specifically design a test to know the answer. Searching the web usally gives you anecdotal answers too, but i found one good source:

How many users have JavaScript disabled? By Nicholas C Zakas. @ http://developer.yahoo.com/blogs/ydn/posts/2010/10/how-many-users-have-javascript-disabled/

In short, it's about 1% to 2%.

Havn't seen a person giving a 30 min talk that's so riveting and intelligent for long. Theodore Gray: Future of Text Book, iPad, Education 📺

A article on my blogger blog discussing the merits of writng on Google blogger vs my own website xahlee.org. @ http://xahlee.blogspot.com/2011/01/xahblogger-vs-xahleeorg.html

JavaScript/DOM: insertAfter a Element (tutorial)

If a title starts with 5 ways, 9 reasons, 10 tips… go read it to decrease your brain size.

Cookies, Super Cookies, Your Privacy

Google and Amazon Generates Invalid HTML (commentary)

Google Search Ranking Ingredients (SEO secrets) (tips)

Browser and URL: Space in File Names

It looks like today's browsers will automatically convert spaces in URL to the required percent encoding %20 in your HTML links or image links. For example, suppose you have this image at 〔http://example.com/i/my house.jpg〕. Notice the space there. In your HTML code, you can just do this:

<img src="http://example.com/i/my house.jpg" alt="my house">

It works in all current version of browsers. It appears that the browsers will encode it for you before sending the HTTP request. ➢ for example: browsers will send GET /i/my%20house.jpg HTTP/1.1.

Of course, by spec, you should encode spaces by %20 in your URI. The common practice today is still not to use any spaces in file names on server. Because this encoding creates a lot complexities. Though, i'm not sure how long this practice will last, because space is just so much easier to type, easier to read, and frequently needed. I wonder, if in a few years, maybe common web practice will use spaces in file names and leave space as is in all URL in html.

For some tech discussion, see: Source stackoverflow.com.

See also: What Characters Are Not Allowed in File Names?URL Percent Encoding and UnicodeURL Percent Encoding and Ampersand Char.

A very nice free JavaScript programing book for beginning programers. At Eloquent JavaScript: A Modern Introduction to Programming By Marijn Haverbeke. At eloquentjavascript.net.

If you have programing experience, please checkout my JavaScript Tutorial for fast intro.

Web Browser Default Line Height Changed?

Sometime in the past 2 years, browsers have changed their default height between lines. For example, before, i have this in CSS to make paragraphs more readable:

p {line-height:140%}

Without that, the lines will be tightly placed together and hard to read. But now, you can take it out. All browsers of current versions, including IE8, do fine.

Opera Turbo Speeds Up Browsing?

Discovered a feature in Opera 10, the “Opera Turbo”. Basically, it's a feature that makes web browsing faster when using a slow connection. Such claim always piques me, because ultimately such thing is simply impossible. Many tools or plug-in with such claims are just malware or wrapper-ware that tries to suck your money.

So, how exactly Opera Turbo works? It turns out, it's basically a proxy service feature. If you turn the feature on, and when browsing some slow website, opera browser will past request to a Opera company's server instead, and the Opera Server makes the request to the site you are visting, then, it compress the data then send that back to your browser.

In other words, it's a proxy service, a middleman. So, yes it does make it faster sometimes (assuming that the site you visit doesn't already do compression). The interesting implication is that: ① Opera the company would know the sites you visit. ② you could use it to visit sites that are censored by your company or school.

To turn it on, go to Preferences, “webpages” tab.

Introduction to jQuery: jQuery Basics Tutorial and also jQuery Tutorial: Selectors.

Waiting for HTML5 to Kill Flash?

Nice blog from Google:

Flash and the HTML5 <video> tag http://apiblog.youtube.com/2010/06/flash-and-html5-tag.html

It's pretty short. But if you want one-sentence summary, the moral is this: for HTML5 and browser tech to catch up with Adobe Flash's features for PRACTICAL needs today , it might take a few years.

Python Doc URL disappearance. (comment)

Update: Syntax Coloring with Google-Code-Prettify (tutorial)

Like what you read? Buy JavaScript in Depth
or, buy a new keyboard, see Keyboard Reviews.