Why does each browser interpret/format a poorly formatted HTML differently than the others?

Asked

Viewed 116 times

1

This week I came across a bug on a system. This system was developed in Asp Web Forms and on a given page has a input that’s like hidden.

While performing a Post I realized that in Chrome and Firefox the value of this input was not being sent on request and in IE the same was sent.

Analyzing the code, I noticed something strange in this input, to tag the same was not being closed, so staying so:

<input type="hidden" name="id" value="<% response.Write(vID) %>"

See that one is missing >. In every browser I tested, IE, Chrome and Firefox, the HTML generated is different from the others.

Chrome:

inserir a descrição da imagem aqui

Firefox:

inserir a descrição da imagem aqui

IE:

inserir a descrição da imagem aqui

  • 1

    Because they are different :P I don’t know if I can answer better than this :) Anyway what is badly formatted is only interpreted by liberality, if it’s wrong, don’t trust that.

  • 1

    Actually, they’re equivalent results. The only detail is that Chrome does not strictly follow W3C/WHATWG recommendations in this case, which define which boolean attributes should contain or a string empty or a string with the desired value. I am commenting on being out of time now. Who knows after lunch in convert in response if no one responds before.

1 answer

1


Each browser has its own engine, which interprets HTML, Javascript, Css. The bad thing about this (or not) is that every browser will / may present your site in a different way. This mistake you have commented on is not as blatant as alignment issues that sometimes make you pull your hair out. Especially in IE(The difference...)

Give a search on browser Engins, you will see that there are many differences between them and that this is even a major concern in systems that should run with cross-browser features...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.