function _sameOrigin(url) {
	var loc = window.location,
		a = document.createElement('a');
	a.href = url;

	return a.hostname == loc.hostname &&
		a.port == loc.port &&
		a.protocol == loc.protocol;
}
// used to check for sameOrigin requests
used to check for sameOrigin requests
used to check for sameOrigin requests
function _sameOrigin(url) {
	var loc = window.location,
		a = document.createElement('a');
	a.href = url;
	return a.hostname == loc.hostname &&
		a.port == loc.port &&
		a.protocol == loc.protocol;
}
function _sameOrigin ( url ) { var loc = window . location , a = document . createElement ( 'a' ) ; a . href = url ; return a . hostname == loc . hostname && a . port == loc . port && a . protocol == loc . protocol ; }
used to check for sameOrigin requests
used to check for sameOrigin requests