UIWebView Xhmtl parse error but safari don't

前端 未结 1 1976
走了就别回头了
走了就别回头了 2021-01-25 06:21

I have an application showing standard html pages. I use UIWebView for html. When using safari for pages no problem. When I use uiwebview the page does not load.

Error m

相关标签:
1条回答
  • 2021-01-25 06:47

    I had a similar issue. I resolved it by explicitly setting the MIME type of the page to be "text/html". Otherwise it was being parsed in the UIWebview as xhtml.

    eg in ASP.NET in your masterpage set

    <% Response.ContentType = "text/html"; %>
    

    Also check your <!DOCTYPE> isn't claiming to be xhtml.

    0 讨论(0)
提交回复
热议问题