Forums

force Refresh html or caching issue

Hello, 1) I have a basic template (form08122023.html) like this:

<html>    
....
<select name="plan" id="plan"> 
        <option value="free">Free</option> 
        <option value="starter" selected>Starter </option> 
        <option value="professional">Professional</option> 
        <option value="corporate">Corporate</option> 
    </select> 
</html>

When i first load the page after a force reload from the green button in web section, the Starter option is selected as it should but when i choose another option and then refresh the page with F5 , the selection does not go back to "starter". How do i fix this issue ?

@app.route('/')
def index():
    # return render_template('form.html')
    return render_template('form08122023.html')

if __name__ == '__main__':
    app.run(debug=True)

I run flask with app.run(debug=True).

2) I also read that debug=True is not suitable for a production environment, i don't know why

thanks for helping.

[edit by admin: formatting]

1) You can try adding autocomplete="off" to the form tag.

2) That's correct, if you run your app with debug=True, you might be exposing sensitive information.

ok, i will try. ty. I dont have the pbl in local(from my pc) for info, when i run the .html

Are you running it in the same browser in both cases?

Thank you nkahr , it works.

"Are you running it in the same browser in both cases?" yes, one from a local file for testing and the second one from pythonanywhere