What are the ways to check in javascript, if the form is posted from same server or some other server?