Xah Web Dev Blog Archive 2011-04

Twitter's URL shortner t.co

Old news. Twitter is now using “t.co” to shorten URL posted thru twitter.com. However, URL will be displayed as the original following ellipsis.

For example, go to this page: http://xahlee.org/sl/lsl-script_count.html, click on the tweet button. Then, Twitter generates a link like this http://t.co/BAPV0SJ9, but when viewed in twitter.com, it is displayed as xahlee.org/sl/lsl-script_… . And when you copy the text, the shortened URL is copied.

According to Twitter, quote:

Twitter's link service (http://t.co) is used on all links included in Direct Message notification emails …

If you just use twitter.com to post a normal tweet, it's not shorterned. For example, if you post http://google.com/ or http://xahlee.org/Periodic_dosage_dir/skami_prosa.html it'll come out as is.


Modern Browsers Will Display Gziped File Directly

Discovered that in latest version of all major browsers, they will display a gzip compressed page directly (instead of asking you to download).

The browsers with this feature includes: IE9, Firefox 4, Google Chrome 11, Opera 11.1. The only browser that doesn't is Safari (v5.0.5 on Windows.)

Btw, that gziped article is mentioned in these articles: Text Processing: Emacs Lisp vs PerlPerl Books Survey 2002.

Unicode Font Comparison: Arial Unicode MS vs DejaVu Sans .

HTML History Timeline. (web history)

A/B Testing, Google, Visual Design

Learned the term [ A/B Testing ] [ https://en.wikipedia.org/wiki/A/B_Testing ]. It can be applied to lots of areas. For example, web page design. Suppose you are not sure larger font or smaller font is best in attracting readers. You alternate the 2 designs on different days, and check your readership. (something like that) This can be applied to lots of other things. Basically, you have 2 choices, you test them both out, and check the data to see which performed better. Here's a Wikipedia quote:

A/B testing, split testing or bucket testing is a method of marketing testing by which a baseline control sample is compared to a variety of single-variable test samples in order to improve response rates. A classic direct mail tactic, this method has been recently adopted within the interactive space to test tactics such as banner ads, emails and landing pages.

Significant improvements can be seen through testing elements like copy text, layouts, images and colors. However, not all elements produce the same improvements, and by looking at the results from different tests, it is possible to identify those elements that consistently tend to produce the greatest improvements.

But here's the interesting part:

Companies well-known for using A/B testing

Many companies use the designed experiment approach to making marketing decisions. It is an increasingly common practice as the tools and expertise grows in this area. There are many A/B testing case studies which show that the practice of testing is increasingly becoming popular with small and medium businesses as well. [1]

While it is widely used behind the scenes to maximize profits, the practice occasionally makes it into the spotlight.

And the most juicy part is the mention of Google, which traced to this very interesting article:

Goodbye, Google By Douglas Bowman At http://stopdesign.com/archive/2009/03/20/goodbye-google.html

In general, i'm spiteful of so-called “designers” in the arts area. They are like semi-beings between craftmen and technician. If soft-porn is crippled sister of porn, then visual designers are soft-artists.

Google's Blogger went down in the past couple of days, alone with it some comments. For example: i have some user comments at http://xahlee.blogspot.com/2011/05/portishead-glory-box.html but now it's gone.

Disqus JavaScript Code. (online comment module; tech tips)

Internet Explorer 9: Turn on Menu; Put Tabs in Separate Row .

CSS's “float” is really hard to understand. How many people in the world really understand it? I'm guessing it's less than 2 thousand.

Here is a test page. html css float left right test page .


Looking For a Tool for HTML/XML Validation

In Firefox, there's a Extension called “Html Validator”. It adds a little indicator icon at the bottom right corner of your window. When a page you visit isn't valid, it lights up. You can click on it to see the errors. The really important feature of this extension is that it does not make a connection to W3C's validator. The same validating SGML parser used by W3C is bundled. This means, it validate any local HTML files. (this is most important use for me, as i do web dev with manually coded HTML files. Each time i preview my HTML in browser, i will know whether it has HTML errors.)

Is there anything similar in Google Chrome, Opera, Safari, or even IE9? As far as i checked in the past years, all other validator i've seen simply send the current URL to W3C's validator site.

I'm looking for a *local* tool to validate HTML. Command line program that can do batch checking will be best. In the past years i've spent a few hours with “html tidy”, and i don't think it's a solution for me, because i have problems using it to check missing tags. I don't need any cleaning up of my source file. All i want is it to tell me if i have missing tags or mis-matched tags, and tell me the line number. (if you really think Tidy does the job, please let me know the exact options. Again, all i need is for it to tell me any missing tags or mis-matched tags.)


HTML Title Tag

Learned a great tip. The “title” tag is supposed to be meaningful even without context. Here's a quote from w3.org :

html title tag 2022-03-15 QGXb
html title tag 2022-03-15 [ http://dev.w3.org/html5/html-author/#the-title-element ]

So, for example, my article on functional programing: What is List Comprehension and Why is it Harmful?, the title element would better be: “Computer Programing: What's List Comprehension and Why is it Harmful?”. Note that you should keep it under 200 chars.

See also: Google Search Ranking Ingredients (SEO secrets) .