Posted (Updated ) in Linux, Uncategorized

I’m currently working on a mobile version of an existing website utilizing the Responsive Web Design paradigm. One problem I instantly came across was a perplexing page width issue on Android. Even with a blank, HTML5 webpage, the page width was appearing at almost twice the width of my phones native resolution (and 2.5x that of my browsers width). For the record, I’m using Android 2.3.3 vanilla with the default browser on a Nexus One.

Firstly an example:

<!DOCTYPE html>
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type='text/javascript' src='' />
<script type='text/javascript'>
	$(document).ready(function() {
		document.body.innerHTML = $(window).width();

The above code gives a blank, HTML5 webpage that will display the pages width on load. When loaded, it would print ‘800’ on the screen – indicating the page was set to an 800px width. This was clearly wrong.

I quickly noticed that using the following doctype:

<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "">

gave me the width I was expecting – 320px. Obviously this isn’t an acceptable solution for responsive web design and so another was needed. Meet viewports. With the addition of a simple META tag I was able to fix the issue (albeit losing the ability to zoom in the process). Simply add the following to your HEAD tag and you should be good to go:

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=0;" />

With this line added, my page now prints 320 to the screen as it should.

For more information, please see this StackOverflow post on the issue.

Read More »

Posted (Updated ) in Linux, Uncategorized

Firstly the background: I own a HTC Magic (32B) running Cyanogenmod 6.1. My internet connection is 1.5Mbit down, 256k up ADSL. My router is a Billion 7401VGPR3 with strong signal and several PCs connected to it – each with flawless internet.

The issue: Around the time I bought a new Billion 7401VGPR3 router, the phones wifi started performing so badly it became unusable. DNS lookups would take anywhere in the vicinity of 45-60 seconds or often simply time out and once the download did somehow get going, it would also occasionally time out. I figured this was just an issue with the hardware in my phone – being 2+ years old, it’s getting a bit dated by android smartphone standards. I was wrong.

During my recent trip to Japan, I happened to score free wireless in one of the hotels (Ahh free wireless, how I love thee) and the wifi unexpectedly worked perfectly. Puzzled by this, I did a bit of research. As it tuns out, this appears to be a common issue with HTC phones. I came across this thread on the issue.

The fix: A few suggestions were made on how to fix it. One member suggested trying a different router, which I did (A Netgear FWG114P) and suddenly wifi worked fine. This was all the proof I needed that the Billion was the culprit. I switched the encryption scheme on the Billion from WPA2 to WEP 128 as per another users suggestion (yes, yes, I know. Flame me if you must, but I already know) and my Android is now lightning fast again.

Thank you androidforums, I was on the verge of giving up and buying a new phone but now I’m good to go for several more years 🙂

Read More »