Users connection speed

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Sequalit
Forum Commoner
Posts: 75
Joined: Wed Oct 12, 2005 9:57 pm
Location: Texas

Users connection speed

Post by Sequalit »

Is there a way to request the users connection speed?

So that if the user has broadband, load the site with high graphics and stuff... but if they have 56k load it in the lower bandwidth version of the site???
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

Usually you can load a graphic, say 100kb and have javascript foward the user to another page only once the page has fully loaded, and time the how long it takes for the user to arrive at the final page***. Not reliable, better option is to allow the user to select his connection speed, or automatically default to broadband and allow the user to select dialup if they so choose.

*** do this in a hidden iframe and display a message so all the user sees is "Detecting connection speed"
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

You could possibly do a similar thing using AJAX. Send a small image with known size and record on the client how long it takes to download. Then send that info using AJAX back to the server to send the correct version of the site. Wouldn't be good for SEO though.... in fact it would be terrible :P

It also falls down if the clients themselves are using available bandwisth elsewhere (e.g. P2P software).
Sequalit
Forum Commoner
Posts: 75
Joined: Wed Oct 12, 2005 9:57 pm
Location: Texas

Post by Sequalit »

Wouldn't be good for SEO though.... in fact it would be terrible
what is SEO:?
User avatar
ambivalent
Forum Contributor
Posts: 173
Joined: Thu Apr 14, 2005 8:58 pm
Location: Toronto, ON

Post by ambivalent »

Sequalit wrote:
what is SEO:?
Search Engine Optimization, I believe.
Sequalit
Forum Commoner
Posts: 75
Joined: Wed Oct 12, 2005 9:57 pm
Location: Texas

Post by Sequalit »

okay, well i found some javascript code that got the conn speed for you, but it uses the uploading that image.

mabye i will ask the user for their conn speed, if they dont know send them to a site that will test it for them, and then I will store it in a session/cookie so that each time they view the site it will check their speed and load up the page like its supposed too, and I will provide a default broadband page that will be linked too for SEO

how does that sound?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Sequalit wrote:how does that sound?
Sounds like good thinking. Just make sure to include a link somewhere whichever version of the site you're currently in so that you can swicth to the higher/lower quality version ;)
Sequalit
Forum Commoner
Posts: 75
Joined: Wed Oct 12, 2005 9:57 pm
Location: Texas

Post by Sequalit »

alright, thanks for the advice/tips!
I love you guys.
Post Reply