IE 8-10 support: JSON undefined? How do you force document mode properly?


#1

I’m getting the following errors in IE with a “enterprise mode” forced document mode of 7:

SCRIPT5009: 'JSON' is undefined 
top, line 7 character 1
SCRIPT5009: '__meteor_runtime_config__' is undefined 
3ac951d892a1cb8fd2f3417d4b18013b7ad52759.js, line 38 character 191

So far I’ve tried the following remedies to no avail:

if (typeof __meteor_bootstrap__.app !== 'undefined') {
  connectHandlers = __meteor_bootstrap__.app;
} else {
  connectHandlers = WebApp.connectHandlers;
}
 
connectHandlers.use(function(req, res, next) {
    // res.setHeader(name, value);
    res.setHeader('X-UA-Compatible', 'IE=edge');
    next();
  });

And I’ve added both:

<meta http-equiv="x-ua-compatible" content="IE=Edge"/> 

and the raw polyfill JSON3 to the main.html file.

Still not working though. Any ideas?