Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adicionar header max-age às respostas da API #9

Open
cmdalbem opened this issue Jan 22, 2018 · 0 comments
Open

Adicionar header max-age às respostas da API #9

cmdalbem opened this issue Jan 22, 2018 · 0 comments
Projects

Comments

@cmdalbem
Copy link
Member

cmdalbem commented Jan 22, 2018

O PageSpeed Insights reclamou que nossas respostas da API não tem header de max-age, ou seja, não aproveitam o cache dos navegadores.

image

Cuidado: cache é algo muito útil, mas muito fácil de fazer merda. Usar cache muito duradouro em respostas pode fazer o estado da aplicação parecer maluco, como se estivesse atualizando os dados quando na realidade está, mostrando dados antigos, etc.

Algumas leituras pra ajudar:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching
https://jakearchibald.com/2016/caching-best-practices/

@cmdalbem cmdalbem added this to To Do in Tarefas via automation Jan 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Tarefas
  
To Do
Development

No branches or pull requests

1 participant