Flask not loading CSS file ..?

So the problem is that my web application only occasionally downloads the css file and uses the same downloadable css files that were downloaded, even if I edit the css file and even when I delete the file. I have no idea what is going on. I noticed that when css loads correctly, the following message is displayed:

127.0.0.1 - - [08/Jun/2015 14:46:19] "GET /static/style.css HTTP/1.1" 200

My style.cssfile is under a folder with a name static, and in my html file I have

<link type='text/css' href='{{ url_for('static', filename='style.css') }}' rel='stylesheet'>
+4
source share
3 answers

The checkbox sets cache control headers to static resources, and your browser will cache these files for up to 12 hours.

Your options:

  • SEND_FILE_MAX_AGE_DEFAULT ; 43200, 0, .

  • URL-; URL- ?<somerandomvalue>, , - . , Flask snippet, url_for(), .

  • ( ), . , , .

+10

- , CSS. , , , Ctrl + F5 .

1:

- CSS/JavaScript , . , CSS .

+1

, ctrl + f5 , , , ctrl + f5,

0
source

All Articles