Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

228
Visualizações
Python Flask 304 response on reload

I am having an issue with a flask app that I can't seem to track down.

The first time I load the index page of my flask app, all resources load correctly. If I reload the page, I get 304 errors on some resources that are loaded from my static directory. These resources have not changed, so the 304 is correct, but it seems like there is not a local resource in the cache.

As you can see in the developer console of chrome, the resources that are red, are ones that have 304'd, and if I click on one of them to view their contents it appears as though no cached version of the resource exists:

No data found from cached resource

This breaks the functionality of the page. If I hard reload, or clear cache and hard reload, the resources load just fine. Also if I just disable cache in chrome, then the page always loads fine, but this requires the developer console to always be open. This flask app did not always do this. Something with flask or chrome has changed since when it was written and I cannot figure it out.

I have also tried tricks like others have recommended with putting date modified tags onto the url, but this doesn't change the outcome. It seems like the local cache of chrome is broken.

This also happens in Microsoft Edge and Firefox.

What is happening!!! This is driving me mad!!!

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Try downgrading the version of both Flask and Werkzeug (v2.0.2 worked for me).

I was using version 2.1.1 and I was having the same issue, but I had another app that used those two libraries that was not failing, and it was using version 2.0.2 of both of them.

Downgrading did the trick for me.

Hope it helps!

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda