Maybe you prevented the redirection event of a tag with JavaScript.
For example:
$(document).on('click', 'a.thatTag', function (e) {
// ...
e.preventDefault();
});
.preventDefault()
prevents redirection.
You have some javascript code which is preventing the default action of the anchor tag to be executed. You could inspect the Network
tab in FireBug or Chrome DevTools to see if some AJAX request is being made when you click on the link. You could try excluding javascript files until you find the one that is doing this.
This may happen if the address does not have the transfer protocol within the href attribute. An example would be linking localhost as <a href="localhost"></div>
instead of <a href="http://localhost"></div>
. You will see that Google Chrome will give a cancelled status if done so, and in Safari a dialog will appear asking which application the link should be opened in, as the transfer protocol is unknown. I encountered this problem when setting the link to $_SERVER['HTTP_HOST']
in PHP.
Key point being, make sure you leave the transfer protocol in front of the link be it http://
, https://
, ftp://
or whatever else.
Try this code...
<a href="http://google.com/" onclick="location.replace('http://google.com/'),'_top'">Google</a>
I know this is an old question, but having just had a similar issue, it sounds like the issue may be that your request is being blocked by the browser. This can happen if you're currently in a secure (https) environment trying to link to an insecure (http) resource.
It's not clear what your href is, but make sure the href is https (or //) if your current environment is secure.
I had e.preventDefault()
set on the parent element.