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

Add some Cache-Control / Expires headers? #8

Open
GitBoudewijn opened this issue Nov 18, 2021 · 1 comment
Open

Add some Cache-Control / Expires headers? #8

GitBoudewijn opened this issue Nov 18, 2021 · 1 comment

Comments

@GitBoudewijn
Copy link

Right now you don't return any Cache-Control and Expires headers so every time the browser makes a request it downloads the whole response again.

I'm not sure what kind of caching you do on your side but it's unlikely that the xml would change every couple of minutes so I would at least have some client side caching.

Otherwise maybe you could have an extra parameter like &cache=30 which controls the amount of minutes after which the response expires.

@GitBoudewijn
Copy link
Author

By the way if you submit the xml directly in the URL obviously the response never changes so you should have something like Cache-Control: public, max-age=31536000, immutable (longest cache possible).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant