The Network Information API gives valuable information about a user's connection

Read on afasterweb.com