@pfefferle Very interested in this interview!

I have a consistent problem w/ WP blogs using the AP plugin where they return a JSON representation when requested in the browser. Is there anything i can do about this?

@ted this is a caching issue. should be fixed now.
@pfefferle Thanks! Out of curiosity is there a root cause to it? I've had this issue several times w/ Laurens Hof's connected places site as well.
@ted wordpress caching does not support content negotiation by default. it caches what was requested and returned. if mastodon requests the page content in JSON after it was federated, the cache would take this response and cache it. so either you disable caching or you disable content negotiation for user facing sites.
@pfefferle ahhh i get you. that's a bummer. Thanks for the info!

@ted you're welcome :)

It is not always easy to deal with the WordPress beast ;)

https://github.com/Automattic/wordpress-activitypub/issues/580

…and to clarify, that was the default behavior, but afaik the plugin was updated to support both caching and content negotiation together.

on a related note, content negotiation sucks 😎 https://snarfed.org/2023-03-24_49619-2

WordPress sometimes returns JSON to a Webbrowser instead of the HTML page. · Issue #580 · Automattic/wordpress-activitypub

Quick summary Sometimes and for some users WordPress returns a JSON object to a regular browser request interested of the normal website. This (sometimes) persists on reload Steps to reproduce No i...

GitHub