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

Remove Pragma header #26

Merged
merged 3 commits into from Jun 1, 2023
Merged

Conversation

dani2819
Copy link
Contributor

@dani2819 dani2819 commented May 31, 2023

What
This PR removes the support for Pragma header from the library

Why
The Pragma header was initially used to provide backward compatibility with HTTP/1.0 caches. However, with the widespread adoption of HTTP/1.1 and the introduction of cache-control directives, the Pragma header has become obsolete. The cache-control directives such as "no-cache" and "no-store" are now the standard mechanisms for controlling caching behaviour. It's also not recommend to use as it as a non-standard now as per MDN docs: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Pragma

So, to align with the latest web standards and best practices, we are removing the Pragma header in this PR.

Related to:#25

Open Question
I didn't bump the version yet to minor (just introduced to CHANGELOG.md), let me know if bumping to minor makes sense here?

@dani2819 dani2819 changed the base branch from main to v4 May 31, 2023 18:20
@dani2819 dani2819 mentioned this pull request May 31, 2023
Copy link
Member

@EvanHahn EvanHahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good other than two small things in the changelog. Thanks for doing this!

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Evan Hahn <me@evanhahn.com>
Copy link
Member

@EvanHahn EvanHahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Thank you!

@EvanHahn EvanHahn merged commit e003b5d into helmetjs:v4 Jun 1, 2023
EvanHahn pushed a commit that referenced this pull request Jun 1, 2023
 The Pragma header was initially used to provide backward compatibility
 with HTTP/1.0 caches. However, with the widespread adoption of HTTP/1.1
 and the introduction of cache-control directives, the Pragma header has
 become obsolete.

 See <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Pragma>
 for details.

See [#26](#26).
@EvanHahn
Copy link
Member

EvanHahn commented Jun 1, 2023

This has been deployed in nocache@4.0.0. Thanks for your work!

If you'd like to add yourself to the contributors list, feel free to edit this file.

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

Successfully merging this pull request may close these issues.

None yet

2 participants