3

On my HTML, have used the meta tag as below for some font issues. I just want to know:

Are these both meta tag meaning the same? Or each one is different?

<meta http-equiv="X-UA-Compatible" content="IE=7, IE=9" /> [separated by comma]

<meta http-equiv="X-UA-Compatible" content="IE=7; IE=9" /> [separated by semicolon]

Please explain on this.

user3209031
  • 837
  • 1
  • 14
  • 38
Sakthivel
  • 678
  • 2
  • 6
  • 19
  • possible duplicate of ["X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE"](http://stackoverflow.com/questions/14611264/x-ua-compatible-content-ie-9-ie-8-ie-7-ie-edge) – CodeFanatic Sep 12 '14 at 10:44
  • no they dont, check the link in my other comment – CodeFanatic Sep 12 '14 at 10:44
  • 1
    @FelixLahmer: although that linked question seems to ask about the difference between semi-colons and commas it doesn't actually seem to address that part anywhere that I can see... – Chris Sep 12 '14 at 10:50
  • @chris If you separate with semi-colon, it sets compatibility levels for different versions if not, 1 compatibility level gets applied, thats what the accepted answer says – CodeFanatic Sep 12 '14 at 10:52
  • @FelixLahmer: it is very explicit about what a semi colon means but to my reading doesn't explain what exactly `content="IE=7, IE=9"` would do. ie is that just a syntax error? will it do something useful or totally unexpected? – Chris Sep 12 '14 at 10:54
  • @chris when using a semicolon u get different compatible modes, when using a , there is only one – CodeFanatic Sep 12 '14 at 10:57
  • @FelixLahmer: Is it advisable to use content="IE7; IE9"? Will this not break any content on browser such as graphics, fonts or images? Please. – Sakthivel Sep 12 '14 at 11:01
  • 1
    it will render ie7 and ie8 in ie7 mode and ie9 as ie 9, the meta itself doesnt break anything, depends on your content – CodeFanatic Sep 12 '14 at 11:04

1 Answers1

-1

The correct form, as Microsoft defines in MSDN is using a semicolong instead of a single comma:

<meta http-equiv="X-UA-Compatible" content="IE=7, IE=9" />

Here the piece of text:

Note: [...] You can also use the content attribute to specify multiple document compatibility modes; this helps to ensure that web pages display consistently in future versions of the browser. To specify multiple document modes, set the content attribute to identify such modes to use. Use a sign semicolon to separate the modes together.

MSDN Resource

Rafa Romero
  • 2,667
  • 5
  • 25
  • 51