There is no problem not worth solving, and no technology not worth learning!

The same CSS file (their ETags are equal), due to the difference in the response’s content-type, leads to the difference in the interface of the web page

同样的 CSS 文件(其 Etag 相等),其响应的 Content-Type 等于 text/plain; charset=UTF-8 时,网页界面错乱。

1. When the same CSS file (its ETag is equal), the response-type of its response is equal to text/CSS, the web interface is normal. as shown in Figure 1

同样的 CSS 文件(其 Etag 相等),其响应的 Content-Type 等于 text/css 时,网页界面正常。
Figure 1

2. When the same CSS file (its ETag is equal), the response-type of its response is equal to text/plain; charset=utf-8, the web interface is confused. as shown in Figure 2

同样的 CSS 文件(其 Etag 相等),其响应的 Content-Type 等于 text/plain; charset=UTF-8 时,网页界面错乱。
Figure 2

3. When the content-type of the response of its response is changed to text/CSS, the web interface is displayed normally. as shown in Figure 3

当 其响应的 响应的 Content-Type 修改为 text/css 后,网页界面正常显示。
Figure 3

4. Reference:https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Basics_of_HTTP/MIME_types#textcss. Any CSS files to be resolved to CSS in a web page must specify MIME as TEXT/CSS. Typically, the server does not recognize the MIME type of a file suffixed with . To send to the browser: In this case, most browsers do not recognize it as a CSS file and ignore it directly. Pay particular attention to providing the correct MIME type for CSS files.

Need long-term technical maintenance or remote troubleshooting?

I am a PHP / Go backend engineer with 15+ years of experience, focused on existing system maintenance, bug fixing, performance optimization, server troubleshooting, WordPress maintenance, and small feature iterations.

If your project is facing any of the following issues, we can start with a small troubleshooting task first:

  • ✅ PHP / Laravel / Yii2 legacy systems without active maintenance
  • ✅ Go / Gin backend APIs that need troubleshooting or optimization
  • ✅ Slow, broken, or unstable WordPress websites
  • ✅ Nginx / MySQL / Redis / Linux server issues
  • ✅ CDN / Cloudflare / DNS / HTTPS configuration problems
  • ✅ Long-term remote technical support or part-time maintenance

More details: About Me & Collaboration

WeChat: 13980074657
Email: shuijingwanwq@gmail.com
Telegram: @shuijingwan
GitHub: https://github.com/shuijingwan

评论

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.