download - PHP or javascript to verify a broadband connection (client Side) -
is there way use php script in website verify given visitor has broadband connection (some minimum downstream kbs ) before proceding render or elements of webpage?
let's see...
when client requests page #1, store timestamp in session. add javascript page #1, client start downloading large file (say, 5mb) page loaded, , request page #2 download has completed. should ajax, happens in background.
now, page #2 compares current timestamp original timestamp stored in session. difference tell how long took client download large file. if you're satisfied speed, send more page elements via ajax again.
but bad idea.
not method require transferring unnecessary file (which can cost money mobile clients), it's extremely unreliable. latency (think "ping") between client , server, cpu usage on client side, congestion on wire, , myriad other factors affect download time. might send real content in time takes run speed test.
in conclusion, there's no way it. render reasonably sized version of page, , load large elements (such videos) after client clicks something. if still on dial-up, they'll know not click on videos.
Comments
Post a Comment