knu/noreferrer

not work on IE11

zh99998 opened this issue · 2 comments

in IE11 it genarated a data-uri link like this

data:text/html;charset=utf-8,%3Chtml%3E%3Chead%3E%3Cmeta%20http-equiv%3D'Refresh'%20content%3D'0%3B%20URL%3Dhttp%3A%2F%2Fwww.whatismyreferer.com%2F'%20%2F%3E%3C%2Fhead%3E%3Cbody%3E%3C%2Fbody%3E%3C%2Fhtml%3E

and then. IE don't support data-uri html, it says can't display this page

this might fix it - get the latest prototype.js and change to use the following line:-

  IE:             ua.indexOf('Trident') >-1 || ( !!window.attachEvent && !isOpera),

I came here after googling for the same issue! The prototype.js trick suggested by @gitcnd fixed the problem!
Here are some more details, for those who need it:

  1. Download prototype.js and put it in your scripts folder
  2. Edit prototype.js, and find change the line:
    return {
      IE:             !!window.attachEvent && !isOpera,

to:

    return {
      IE:             ua.indexOf('Trident') >-1 || (!!window.attachEvent && !isOpera),

Now, use noreferrer.js instead of jquery.noreferrer.js, and it should work. You'll still get an ugly white screen when using IE11, but at least it will work!