Added check for http hosting so we don't try to send ajax from file protocol