Sun Java System Web Proxy Server 4.0.3 2006Q2 Administration Guide

myIpAddress()

The myIpAddress() function is useful when the JavaScript function has to behave differently depending on what host on which the browser is running. This function returns the IP address of the computer that is running the browser.

Returns:

dotted quad IP address as a string value

Example:

The following example returns the string 198.95.249.79 if you are running Navigator on the computer home.example.com.

myIpAddress()