supported DOCTYPE?

97 views
Skip to first unread message

r4nd

unread,
Aug 24, 2009, 9:48:51 AM8/24/09
to Google Web Toolkit
What DOCTYPEs does GWT officially support as of v1.7? I noticed third
party modules like GXT requires HTML 4.0 Transitional. Our project is
currently using XHTML 1.0 Strict. I am curious what GWT developers
recommend for working with GWT.

Sumit Chandel

unread,
Aug 25, 2009, 6:32:11 PM8/25/09
to google-we...@googlegroups.com
Hi r4nd,

I think the question to ask is not which doctypes GWT officially supports, but which browser render modes does GWT support. The answer to that question is both quirks mode and standards mode, with standards mode support being the most recent.

That said, doctypes have the effect of triggering render modes in various browsers. The doctype you're using will trigger standards mode rendering in most browsers, and so will be supported by GWT. However, an important point to note is that you shouldn't serve your host HTML page with an application/xhtml+xml Content Type header. This will activate XML parsing on browsers that support that content type and will generally have negative effects on the performance of your application, and won't work in GWT.

Setting the XHTML attribute in the doctype doesn't have the effect of triggering XML parsing, and so GWT will work with the doctype you set above.

A good read if you're looking for more information about doctypes and browser render modes:

Hope that helps,
-Sumit Chandel
Reply all
Reply to author
Forward
0 new messages