Force IIS to allow transitional doctype

2019-08-01 02:22发布

I have a website developed in Visual Studio, and tested with the IIS Express coming with VS. Everything is fine in the testing phase. The website looks good both in Firefox and IE.

But when uploaded to the IIS Server, the site is only normally rendered in Firefox. Crappy in IE.

I found the DOCTYPE was automatically changed from "Transitional" into "Strict". Why do they change this? And how can we force the IIS to display correctly?

2条回答
来,给爷笑一个
2楼-- · 2019-08-01 03:03

Your document should contain the doctype. Don't let IIS do it at all.

查看更多
一夜七次
3楼-- · 2019-08-01 03:05

Are you on the same domain? If so, IE automagically forces one into intranet-friendly compatibility mode. See this answer for a method to force it to avoid that.

查看更多
登录 后发表回答