peter
peter

Reputation: 15149

JSON is undefined in IE 11

We have a web application which is used from Windows 7 with IE 11. For all of them, but one person, it works normally.

1 user get's the error message

"JSON" is undefined

This happens in the line where we run

JSON.parse(....)

The document has the normal doctype header

<!DOCTYPE html>

And the website shouldn't be rendered in IE's compatibility mode (at least according to the screenshots provided by the user)

The only way we could reproduce it was, activating the compatibility mode. And as I said it works for >20 other users.

So is there a way to check if the application is executed in compatibility mode? Or maybe there is another reason how JSON could be undefined?

Upvotes: 0

Views: 3923

Answers (1)

TwilightTitus
TwilightTitus

Reputation: 296

You can use

document.documentMode 

to check the compatibility mode.

Upvotes: 4

Related Questions