Resource interpreted as Stylesheet but transferred with MIME type Application/x-css

Source: Internet
Author: User

A simple page was made with tornado. The CSS in the results page is loaded, but it has no effect. Debug with Google Chrome, said to be resource interpreted as Stylesheet but transferred with MIME type APPLICATION/X-CSS. It probably means that the CSS file is recognized as a stylesheet, but it is transmitted in APPLICATION/X-CSS format. This causes the browser not to display the page properly, CSS does not work at all. The reason is that web.py in Tornadod calls Mimetypes.guess_type () when setting Content_Type



and Mimetypes when initializing, if it is in the Windows environment, The local registry is read.


So just put the content type of the CSS file in the registry by APPLICNTION/X-CSS

You can change to text/css.

Resource interpreted as Stylesheet but transferred with MIME type Application/x-css

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.