Possible Duplicate:
Force a browser to load the 'https' edition of a website, not the 'http'?
I'm open to suggestions, if it is possible to do this.
I'm open to suggestions, if it is possible to do this. | |||||
feedback
|
This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.
|
No, because if the web site does not support https. For example https://google.com kicks you to http://google.com https://amazon.com gives you a big red nasty warning. https://apple.com doesn't even load a page. | |||||||
feedback
|
|
What you're asking for is already a Firefox plugin called HTTPS-Everywhere. The Chrome API doesn't seem to offer enough control to allow that level of URL rewriting. Even if you could, there are reasons not everyone uses https, caching and virtual hosts, etc. There's a recent slashdot post that covers some of the reasons why. You wouldn't be able to blindly say 'http => https', so you would need an intelligent plugin like above, which doesn't exist for chrome. | |||||
feedback
|
|
This isn't really an answer, but here's what you could do if you have FireBug or a JavaScript console available... using JavaScript you'd check for the existence of an HTTPS version of the site, and go to it if it exists... otherwise this will just alert() you that no HTTPS version of that site exists. Maybe this will just put a perspective on what you're asking? I dunno...
var jQuery = jQuery || null;
if (!jQuery){ // Load in jQuery
(function(){j=document.createElement("SCRIPT");j.src="http://code.jquery.com/jquery-latest.pack.js";document.getElementsByTagName("HEAD")[0].appendChild(j);})()
}
var timeout = window.setInterval(function() { // wait for jQuery to load
if(jQuery) {
window.clearInterval(timeout); // once jQuery is loaded kill the interval
(function($) { // make sure $=jQuery
$(document).ready(function() { // on document ready...
if(document.location.protocol != 'https:') { // check the protocol to see if we're already on https
var url = document.location.href.replace('http:','https:'); // if not, try to load the https version
$.ajax({
type: 'GET',
url: url,
success: function(r) {
window.location = url; // if successful, load the https version
},
error : function(r) {
alert('https does not exist for this site'); //
}
});
}else {
alert('already on https');
}
});
})(jQuery);
};
},1000);
| ||||
|
feedback
|