xhtml, which do you use with rails?

Hi, you can use XHTML 1.0/1.1 or HTML 4.01. It really depends on what
browsers you'll support and it's different for everyone.

Good luck,


The use of rails doesn't effect your doctypes.
See this article for a clear explanation on the difference between
strict vs. transitional doctypes and their proper uses:

BJ Clark

Use a before_filter in your application controller to set the headers correctly.
Something like:

  def set_encoding
    if request.env["HTTP_ACCEPT"] &&
      headers["Content-Type"] = "application/xhtml+xml; charset=utf-8"
      headers["Content-Type"] = "text/html; charset=utf-8"