Is it possible to get a visitor/requester public (WAN/external) IP address with pure Javascript? IE. without the use of additional JS libraries like jQuery? If so, how?
Tell me more
×
Webmasters Stack Exchange is a question and answer site for
pro webmasters. It's 100% free, no registration required.
|
closed as off topic by Su', Christofian Feb 28 at 2:38
Questions on Webmasters Stack Exchange are expected to relate to webmastering within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.
|
Javascript runs on the client, which may have multiple network conenctions, which may be behind firewalls and NATs. You will only be able to retrieve the IP address once the connection has been made outside of the network. You could call a service that just bounces back the IP address, but this requires having the service and bandwidth set up. |
|||||||
|
