سؤال

I am creating a script which outputs JSON. It has the correct content type (application/json). When viewed in Firefox, the "Page Info" says it is in Quirks mode. My JSON passes through a validator with no errors or warnings.

Does Firefox always display JSON in Quirks mode, or is there something I can put in my output to elevate it into Standards mode?

I'm asking this question as a matter of curiousity rather than because it will destroy my application, but I would rather all program output be as compliant as possible with any existing recognised protocol or standards.

هل كانت مفيدة؟

المحلول

Firefox generates an HTML document to render a pretty formatted version of JSON. That document triggers Quirks mode.

Since you aren't maintaining the HTML document, you don't need to worry about the rendering mode.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top