I think I should use <!DOCTYPE html>
for my new GWT application; I understand that doing so will put my application into standards-compliant mode. Am I correct? Are there any disadvantages to using this doctype? Does GWT work properly in standards-compliant mode? I'm wary because the GWT tutorial still uses the HTML 4.01 transitional doctype.
Which doctype should I use for GWT 2.0?
Asked Answered
The new layout panel functionality in GWT 2.0 requires standards mode and does not work in quirks mode.
TBH, as far as I know only IE really needs standards mode to cope with the new layout panels - Firefox & co work fine in quirks mode. That being said, I'd still recommend standards mode - since GWT will be focusing on supporting that one in the future. –
Nitid
Using <!DOCTYPE html>
will put the web browser into standards mode (as opposed to quirksmode) which is almost certainly what you want. But the HTML 4.01 Transitional doctype will also trigger standards mode, so there's no difference there.
I've no idea of the implications of using one or the other with GWT - but I doubt there are any advantages to using the HTML5 doctype to be honest, unless GWT is doing special things to support HTML5.
One difference that I noticed is this: with the HTML 4.01 Transitional doctype, text input fields use the border-box sizing model; whereas with the HTML5 doctype, they use the content-box sizing model. –
Demott
The GWT-generated comment at the top of my project's HTML file says 'The HTML 4.01 Transitional DOCTYPE declaration above set at the top of the file will set the browser's rendering engine into "Quirks Mode".' –
Contestation
what are the advantages of using Quircks mode? when to use standard mOde? –
Bertelli
© 2022 - 2024 — McMap. All rights reserved.