Does anyone know a way to detect the older set of devices:
From the newer
Little Benchmark that detects older models. The Benchmark takes 5-30ms so no real problem.
function runBenchmark(){
var time,
init = new Date(),
iterations = 5000;
while (iterations--) {
Math.sqrt(iterations*Math.random());
}
time = new Date - init;
return time;
}
function detectIphoneSpeed () {
if (runBenchmark()<15) {
return "3gs";
} else {
return "3g";
}
}
var iphoneSpeed = detectIphoneSpeed();