Answer the question
In order to leave comments, you need to log in
Flask after running the code, the site does not change. Why?
I wrote
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/link1')
def link1():
return "ссылка1"
@app.route('/link2')
def link2():
return "ссылка2"
@app.route('/link3')
def link3():
return "ссылка3"
if __name__ == '__main__':
app.run(debug=True)
Answer the question
In order to leave comments, you need to log in
this is a cache invalidation on the client side, and that’s a big ideological trouble (not a bug but a feature)
in the browser, press ctrl + f5 to force refresh the data in the cache
for the future, as one of the solutions, all links to static files should be made with their version number (or to example hash)
https://example.org/main.css?ver=1
or
https://example.org/main.7f1acc2b.css
where 7f1acc2b is some hash of the file contents (the main thing is to change when it changes)
respectively files must be renamed after publishing, including links to them
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question