Django - http code 304, how to workaround in the testserver?

久未见 提交于 2019-12-04 03:08:42

问题


I have a CSS code that generates http 304:

[08/Nov/2011 15:22:07] "GET /site_media/logo1.gif HTTP/1.1" 304 0

How can I get a workaround using the Django test server? Any clues?

Best Regards,


回答1:


The 304 code is not an error. You don't need a workaround. It simply means that the static file has not changed since your browser last accessed it

For more information see the Wikipedia explanation of 3xx status codes.




回答2:


If you're getting 304 with files you did change, you can force reloading in your browser by checking "Disable cache" in your browser's dev tools (on Chrome/ium, right click on webpage -> inspect element -> go to network tab -> disable cache)



来源:https://stackoverflow.com/questions/8056592/django-http-code-304-how-to-workaround-in-the-testserver

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!