Guys, if you have any idea about the logic behind the slow connection in gmail
views:
152answers:
2
+6
Q:
How google detects that u are having slow connection, and suggest u to use basic html in gmail
+5
A:
I don't know if this is how Google does it (though it seems sensible), but what I'd do is perhaps time the initialisation process - e.g. "have certain key elements been initialised in the document within (say) 30 seconds" - if not, then propose to the user that their connection's slow. The language Google uses, as you know is, "this seems to be taking longer than normal", which suggests to me that they don't have an overly complicated solution to this.
Rob
2010-03-20 16:05:28
@Rob 30seconds waiting for initialising. what if the server is out of service!!
Suresh S
2010-03-20 16:10:56
That can be detected, as initializing can be quite a load of data, but detecting whether it is still online only takes a few bytes.
Dykam
2010-03-20 16:21:58
I once looked at Gmail's sources (not everything, only the obvious parts) and this is exactly what Gmail does (and the timeout is indeed 30 seconds).
Marcel Korpel
2010-03-20 17:01:02
+3
A:
Here is (in vastly simplified form) how I'd imagine they do it.
// Pop an alert after 30 seconds
var timeout = setTimeout(function () {
alert('Your connection/computer is slow!');
}, 30000);
// Loading logic
loadStuff();
// When done loading (if it took less than 30 seconds),
// calling this will prevent the alert from popping up.
clearTimeout(timeout);
Casey Hope
2010-03-21 01:21:06