public static function supports_json_contenttype() {
        // Modern browsers other than IE correctly supports 'application/json' media type.
        if (!self::check_ie_version('0')) {
            return true;
        }

        // IE8+ supports 'application/json' media type, when NOT in Compatibility View mode.
        // Refs:
        // - http://blogs.msdn.com/b/ie/archive/2008/09/10/native-json-in-ie8.aspx;
        // - MDL-39810: issues when using 'text/plain' in Compatibility View for the body of an HTTP POST response.
        if (self::check_ie_version(8) && !self::check_ie_compatibility_view()) {
            return true;
        }

        // This browser does not support json.
        return false;
    }