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

Temporary change theme for Webmention request #38

Closed
pfefferle opened this issue Jul 11, 2018 · 10 comments
Closed

Temporary change theme for Webmention request #38

pfefferle opened this issue Jul 11, 2018 · 10 comments

Comments

@pfefferle
Copy link
Member

What about bundling a microformatted default barebone theme (no style, just POSH) and use this theme if the request useragent is /.*webmention.*/?

@dshanske
Copy link
Member

Does everyone use this in their user agent?

@pfefferle
Copy link
Member Author

I don't think so, but even if we get > 70% it is worth trying?!?

@pfefferle
Copy link
Member Author

From the spec:

Senders may customize the HTTP User Agent [RFC7231] used when fetching the target URL in order to indicate to the recipient that this request is made as part of Webmention discovery. In this case, it is recommended to include the string "Webmention" in the User Agent. This provides people with a pointer to find out why the discovery request was made.

@pfefferle
Copy link
Member Author

@Aaronok @indieweb/wordpress what do you think?

@snarfed
Copy link
Member

snarfed commented Jul 23, 2018

hrm, i'm not sure. sounds like this would have most of the problems we've documented in https://indieweb.org/sidefile-antipattern . i imagine you'll end up with different content in this special theme, and that will diverge from the user-visible theme even more over time. not to mention you then have twice the maintenance work since there are two themes instead of one.

@aaronpk
Copy link
Member

aaronpk commented Jul 24, 2018

Sounds kind of like doing content negotiation to return a different document for a specific request. I'm not a huge fan of requiring content negotiation but it seems that would be a better approach than this theme switching, since at least there are existing defined behaviors for it. Theme switching seems like it'd be full of problems like if there is a cache plugin or if it's behind a caching cdn...

@pfefferle
Copy link
Member Author

@aaronpk for example a jf2 feed as fallback if theme does not support mf2?

Like: Accept: text/html, application/jf2feed+json

@aaronpk
Copy link
Member

aaronpk commented Jul 24, 2018

Yeah exactly, that way the client can tell the server what formats it can handle, so the server can decide to return a jf2feed (or maybe just the microformats json?) instead. This should also work behind caching proxies since they should take the Accept header into account.

Just to be clear, I'm not sold on this idea to begin with, but I would hate to see a super non-standard way of doing it.

@pfefferle
Copy link
Member Author

I already started an experimental plugin over a year ago https://github.com/pfefferle/wordpress-uf2-feed

But I got your point, perhaps we can start a brainstorming page in the wiki...

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

4 participants