April 24, 2012

How to run two versions of static website simultaneously for A/B testing?

Question by Jitendra Vyas

For example I have a very simple website only HTML/CSS/Javascript based no php,.net, ruby is being used. Some visitors to my site should see version “A,” while others see version “B.

Site is hosted on Apache server

Answer by Starx

One way is by analyzing the IP Address or range.

Create list of IP Address/Range

$ips = array(
    "a" => array( 'xxx.xxx.xxx.xxx', ....),
    "b" => array( 'xxx.xxx.xxx.xxx', ....),
);

Now, use $_SERVER['REMOTE_ADDR'] and switch the domain

if(in_array($ips['a'], $_SERVER['REMOTE_ADDR'])) {
    header("location: website.com/a");
} else {
    header("location: website.com/b");
}
exit;
June 2, 2010

What is the minimum screen resolution for which you guys currently optimize your web designs?

Question by digitalis

I don’t really know if I’m asking in the right place, so if my question has to be transferred I apologize for it. I am totally noob in this place.

Thank you.

Answer by Josh K

Whatever I’m working on.

Really I try to fit everything on about 900px. 1024×768 is very much the norm, and the most common resolution today. I wouldn’t go past it without a very good reason too.

Answer by Starx

I suggest

750px if targeting 800 x 600 px

950px if targeting 1024 x 768 px

1220px if targeting 1280 x 1024 px

Whatever system you are targeting, make sure you leave at least 50px gap for the scroll bar and sidebar(in some browsers)

...

Please fill the form - I will response as fast as I can!