Content type for HTML fragments

前端 未结 3 1812
别跟我提以往
别跟我提以往 2020-12-29 20:03

When a server sends an HTTP response with an HTML document in the body, it would usually use the text/html content type. Should the content type be different if

3条回答
  •  旧巷少年郎
    2020-12-29 20:30

    It's a personal preference. If it is only your app, then it doesn't matter. I would keep it text/html because it is still HTML markup, even if not a complete document.

提交回复
热议问题