Configuring encoding for static files in iis

How can I guarantee that IIS (and Cassini) will send css and js files with a content header (e.g. text / css; charset = UTF-8)?

+3
source share
1 answer

Having run the same question, I found the answer here (for IIS7 / 7.5, but expect this to work for Casini too):

Or:

  • Directly add ; charset=utf-8to the mime type in the mine type configuration in IIS Manager.
  • Edit the web.config file:
  <configuration>
    <system.webServer>
      <staticContent>
        <mimeMap fileExtension = ". rss" mimeType = "text / xml; charset = utf-8" />
      </staticContent>
    [...]
+2

Source: https://habr.com/ru/post/1705030/


All Articles