Archive

Archive for the ‘Web’ Category

Google chrome frame test

September 30th, 2009

Long time no update.

I have just added google frame to my blog template. I was trying to find some sites actually use chrome frame without any success. Just out of curiosity I added it to my own website.

Here are screenshots after install chrome frame in my ie8.
About box

Right Click Menu

Update 1: The display will flick when it switches rendering engine. Ie8 will also switch render engine back when I click a regular webpage.

Bookmark and Share  
 

Yejun Web , ,

My Varnish VCL for WordPress

April 5th, 2009

On Varnish’s official website, there is a WordPress optimization guide For The Impatient: Preparing Varnish/Wordpress for a Slashdotting in 60 seconds or less….

The problem is that it removes cookie too aggressively. All non admin page will be virtually static. So I made my own vcl to remove cookies for only static files.

Here it is

backend default {
.host = "10.25.0.1";
.port = "80";
}
 
sub vcl_recv {
# Normalize Content-Encoding
    if (req.http.Accept-Encoding) {
        if (req.url ~ "\.(jpg|png|gif|gz|tgz|bz2|lzma|tbz)(\?.*|)$") {
            remove req.http.Accept-Encoding;
        } elsif (req.http.Accept-Encoding ~ "gzip") {
            set req.http.Accept-Encoding = "gzip";
        } elsif (req.http.Accept-Encoding ~ "deflate") {
            set req.http.Accept-Encoding = "deflate";
        } else {
            remove req.http.Accept-Encoding;
        }
    }
# Remove cookies and query string for real static files
    if (req.url ~ "^/[^?]+\.(jpeg|jpg|png|gif|ico|js|css|txt|gz|zip|lzma|bz2|tgz|tbz|html|htm)(\?.*|)$") {
       unset req.http.cookie;
       set req.url = regsub(req.url, "\?.*$", "");
    }
# Remove cookies from front page
    if (req.url ~ "^/$") {
       unset req.http.cookie;
    }
}
sub vcl_fetch {
        if (req.url ~ "^/$") {
                unset obj.http.set-cookie;
        }
}

So all interactive pages will be sent to php backend with correct cookies. All static files and front page will be served by varnish proxy.

Bookmark and Share  
 

Yejun Web , ,

Plugin Image Optimizer

March 29th, 2009

This plugin will reduce uploaded image size in wordpress.
You will also need to install Optipng , Jhead and unsafe mode php.

These tools will only strip meta information of your images, therefore the result should be lossless.

You can download this plugin here.

Bookmark and Share  
 

Yejun Web , ,

A Funny Saiyuki Episode

March 28th, 2009

A Beautiful Assassin is really funny, stupid and romantic Saiyuki episode.

You promised me you’d follow me to the end of the earth.

<a href="http://www.joost.com/37nir0s/t/Saiyuki-Ep-5-A-Beautiful-Assassin" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.joost.com');">Saiyuki Ep. 5: A Beautiful Assassin</a>

Bookmark and Share  
 

Yejun Web

CDN Latency Compared

March 21st, 2009

I compared some puplar commercial CDN’s global latency by using just-ping.

The raw test result you can downloaded from here.

Result Summary:

.

Network Average Median

.

Akamai 9.67 2.9

.

Aol CDN 9.22 4

.

Panthercdn 62.36 12.7

.

LimeLight 58.04 13.2

.

Mosso Cloud Files 56.81 13.5

.

Amazon Cloudfront 62.82 18.6

.

Google Homepage 53.53 23.15

.

Cachefly 54.57 28.2

.

Google Ajax Library 54.96 28.5

.

Homemade CDN 76.31 29

.

Yahoo Homepage 82.77 38.4

.

Google App Engine 76.03 42.8

.

US East 130.11 96.9

.

SimpleCDN 142.84 100.8

.

US West 156.32 165.4

Chart:

CDN Latency Comparison

Notes:

  1. Akamai
  2. Aol CDN is served by Akamai
  3. Panther Express
  4. Limelight Networks
  5. Mosso is served by Limelight
  6. Amazon CloudFront Images on this page are served by CloudFront
  7. Google
  8. CacheFly
  9. Google AJAX Libraries
  10. This page is served by my own homemade CDN, you can test speed here
  11. Yahoo
  12. Google App Engine
  13. Single location ip in New Jersey USA listed here for comparison purpose
  14. SimpleCDN
  15. Single location ip in California USA listed here for comparison purpose

Disclamer: I am not affiliated to any company mentioned above. Nor do I endorse the accuracy of these results.

Bookmark and Share  
 

Yejun Web , , , , ,

My Google Voice

March 20th, 2009

My grandcentral account is finally ready for Google Voice.

Here is my shiny Google Voice Widget. It will be redirect to voice mail.

Bookmark and Share  
 

Yejun Web , ,