How to force a browser to show the latest changes to a CSS file?

前端 未结 3 491
清歌不尽
清歌不尽 2020-12-11 05:57

I made some changes on a CSS file on a PHP site.

The changes do not show up in any browser I test it on until I hold down the CTRL key and click the brows

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-11 06:42

    You can't.

    If the new CSS file has the same name as the old the browser will use the cached file. This means that you've either got to:

    1. use some form of `css_filename.css?version_number`
    2. or, use another name for the new file
    3. or, do as you're doing, and use ctrl+F5

提交回复
热议问题