So let's assume we have two web sites:
- one is hosted on a public web hosting account with a public domain name e.g. mydomain.com 
- the other is hosted on a local computer e.g. my laptop, but is configured to run with the same hostname e.g. mydomain.com, using Apache Virtual Hosts 
So both will have the same window.documentURI or window.location.href.
Is there a way I can determine, using Javascript, which Web site is hosted publicly and which one is hosted privately?!
Thanks
EDIT
The reason I need this is I'm finishing up a JQuery Plugin that submits some data to a remote server [analytics basically] and I want to make the feature more secure by preventing spoofing by someone using a local server with the same hostname as the rightful user to mess up the data.
 
     
    