因此,当您更改CSS或JS静态文件并运行服务器时,有时会发生的情况是浏览器跳过您更新的静态文件并使用其缓存内存加载页面,如何避免此问题?
发布于 2020-04-23 09:33:37
有多种方法可以避免这个问题。
- if you are using Mac: Command+Option+R
- if you are using Windows: Ctrl+F5
它所做的就是重新下载缓存文件,从而能够更新浏览器中的静态文件。
- making a new static file and pasting the existing code of the previously used static file and then running the server
在这种情况下,所发生的情况是浏览器不使用缓存内存来呈现页面,因为它假设它是一个不同的文件。
发布于 2021-10-28 15:24:54
你的DEBUG = False在你的settings.py里。打开DEBUG = True,玩得开心
https://stackoverflow.com/questions/61383900
复制相似问题