摘要 |
The present disclosure relates to the field of computer network, and disclosed are a web page coding identification method and device. The method comprises: loading web page data, the web page data comprising at least one web page resource; detecting whether the web page resource is a hypertext markup language (HTML) resource and declares a coding mode; if the web page resource is the HTML resource but does not declare a coding mode, then identifying the coding mode of the HTML resource; and decoding the HTML resource employing a decoding mode corresponding to the identified coding mode. The present disclosure solves the problem in relevant art that a browser may display garbled text when the "charset" field is missing in the web page coding, such that the web page resource can be properly decoded and displayed even when the coding mode is not declared in the web page resource. |