0

I know this is counterintuitive to the norm and would raise some eyebrows but I'm planning on making an easter egg of sorts for my circle of friends and want the website I'm making to only be available on Internet Explorer 11.

With that in mind, what are some things that I can do so that my website could only render in Internet Explorer aside from ActiveX controls? Are there IE-specific HTML tags or JavaScript functions I can use that don't work on modern day browsers?

I initially thought of just checking the browser's user agent but that's too easy to get around with, however, I would prefer that they don't need to download additional things (Silverlight, etc) and just use the default Internet Explorer included with Windows 10.

1
  • You could find inspiration here.
    – GOTO 0
    Commented Dec 1, 2021 at 9:36

1 Answer 1

0

If you don't want to check browser's user agent, you can check documentMode Property to detect IE.

document.documentMode is only supported by IE, so you can check this property to make functions only works in IE. Please refer to the sample JavaScript code below:

if (window.document.documentMode) {
  // Do IE stuff
}

Not the answer you're looking for? Browse other questions tagged or ask your own question.