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

WP Super Cache: do not serve cached content if client doesn't accept text/html #33968

Closed
donnchawp opened this issue Nov 6, 2023 · 0 comments · Fixed by #33972
Closed

WP Super Cache: do not serve cached content if client doesn't accept text/html #33968

donnchawp opened this issue Nov 6, 2023 · 0 comments · Fixed by #33972
Assignees
Labels
[Plugin] Super Cache A fast caching plugin for WordPress. [Pri] Normal Triaged [Type] Bug When a feature is broken and / or not performing as intended

Comments

@donnchawp
Copy link
Contributor

If the page /author/username is loaded by a browser, then that page is cached. If a Fediverse client subsequently tries to access it, the cached HTML page will be served. If there is no cached page, then JSON code is served.

When serving a cached page, the plugin should make sure that the client can accept text/html.

Ref: https://wordpress.org/support/topic/wp-supercache-seems-to-ignore-non-default-accept-header/

In the future, we should cache 'application/activity+json' requests:

  • Create a "sanitized content-type" for the type of request. 'text/html' vs 'application/activity+json' to start with.
  • Add content-type to the cache key
  • Modify the "incomplete page" check, so it only operates on HTML pages.
@donnchawp donnchawp self-assigned this Nov 6, 2023
@donnchawp donnchawp added the [Plugin] Super Cache A fast caching plugin for WordPress. label Nov 6, 2023
@jeherve jeherve added [Type] Bug When a feature is broken and / or not performing as intended [Pri] Normal labels Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Plugin] Super Cache A fast caching plugin for WordPress. [Pri] Normal Triaged [Type] Bug When a feature is broken and / or not performing as intended
3 participants