Bunny Rabbit
Bunny Rabbit

Reputation: 8411

No. of hops to a website using JavaScript

Is it possible to count the number of hops to a website using javascript (in browser javascript) ?

where hop count : the number of hops a packet has taken toward its destination.

if no ? what are the other options that i have ?

Upvotes: 1

Views: 491

Answers (2)

wiifm
wiifm

Reputation: 3798

As several people have already mentioned, there is no pure javascript way to do this.

However, if you really want this type of functionality on a webpage, you could simply use javascript to load a server side page (perhaps through AJAX), and use a server side programming language to do all the heavy lifting

An example server side language, could be PERL, as there is a 'traceroute' library. The library page also has an example to get you started

Upvotes: 1

user166390
user166390

Reputation:

No.

Well, technically I guess one could use an ActiveX control with JavaScript.... but... no.

Edit: I assumed you meant in-browser JS. If it's server-side JS then the same applies: "technically" if you have access to the appropriate library/program/API with such low-level network access. But, generally (and insofar as JavaScript itself) no.

Upvotes: 2

Related Questions