Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Automatically detecting client internet speed

 
shaweta sharma
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
automatically determine client internet speed and direct requests based on that internet speed without needing to ask the client for input
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Is this a question?
If it is a question about how to determine internet speed, then a way of determining the time it takes for a request to reach a server and the time it takes for a response to travel back to the client could be as follows:
- Maintain a server which clock is set in a way so that a client can determine the server's clock without contacting the server.
- The client creates a time-stamped request and send it to the server.
- The server, upon receiving a request, time stamps it and returns the response to the client.
- The client can, when receiving a response, calculate the time it took for the request to travel to the server and the time it took for it to travel from the server and back.

Disclaimer:
I have not implemented anything like what I describe above, so there are probably room for improvements.
Best wishes!
 
shaweta sharma
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply but i have tried to implement it but not succeeded , if you can help me with an example
 
Paul Clapham
Sheriff
Posts: 21892
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, we want to work with your code, not somebody else's idea of what you might be asking about. So let's start with your code which didn't succeed and go from there.
 
shaweta sharma
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have used javascript but not giving me reliable answer.
 
Akhilesh Trivedi
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then why did you raise this question under Webservice?

FYI,

http://www.coderanch.com/forums/f-20/HTML-CSS-JavaScript

Can you post the code?
 
shaweta sharma
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am new to this Forum , I don't have idea where to post the problem My actual problem is that I am creating some pages to be accessible on mobile I want detect client internet speed , for directing users to appropriate page corresponding to there bandwidth
 
Akhilesh Trivedi
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shaweta sharma wrote:
Hi I am new to this Forum , I don't have idea where to post the problem


http://www.coderanch.com/how-to/java/HowToAskQuestionsOnJavaRanch
 
shaweta sharma
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

please give answer to my question
 
Akhilesh Trivedi
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shaweta sharma wrote:I have used javascript but not giving me reliable answer.


For your problem, I googled and found that internet speed is variable. One trick is to download a file(make an unnecessary call to server), note the time taken(through program preferably java script) and divide by the file size. Issues like caching of temporary files may need to be taken care of.
 
Akhilesh Trivedi
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shaweta sharma wrote:
please give answer to my question

Given!
 
shaweta sharma
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It will be great help if you provide some code.
 
Akhilesh Trivedi
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shaweta sharma wrote:
It will be great help if you provide some code.


Check the following code and tell me if it is working at your end.

 
shaweta sharma
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is working fine on my system, but I think mobiles don't support java script.
 
Tim Moores
Saloon Keeper
Posts: 3271
55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shaweta sharma wrote:I think mobiles don't support java script.

Depends - most smartphones do. Which device(s) are you targeting?
 
shaweta sharma
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

SmaetPhones mainly
 
Akhilesh Trivedi
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

And what are the speed ranges you wish to classify?
 
shaweta sharma
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

not specific
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Akhilesh and shaweta - please cut down on your use of quoting. There is not much point in quoting the immediately preceding post, and absolutely no point in quoting a post in in its entirety. Quoting is for highlighting a specific point you're answering if it's not obvious what that point is.
 
Akhilesh Trivedi
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf.
 
Vijitha Kumara
Bartender
Posts: 3953
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi shaweta sharma,

Is this a J2ME application or any other platform?
 
shaweta sharma
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vijitha Kumara wrote:Hi shaweta sharma,

Is this a J2ME application or any other platform?



It is a web page developed in JSP
 
Vijitha Kumara
Bartender
Posts: 3953
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What approach you have followed to implement this? Better to provide more details of what you have in hand.
 
Vijitha Kumara
Bartender
Posts: 3953
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to JSP forum.
 
Time is mother nature's way of keeping everything from happening at once. And this is a tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!