3 ms·
Long term, a new HTTP META method would be interesting. I wonder if something like that has ever been considered. Providers like Cloudflare would hopefully be m
by bgirard 6y ago
Long term, a new HTTP META method would be interesting. I wonder if something like that has ever been considered. Providers like Cloudflare would hopefully be more lenient with these requests.
- nbadg 6y agoHuh. It's certainly an interesting idea! Strictly speaking, individual people could implement this today, since nonstandard HTTP verbs don't break anything that doesn't know to request with them. (It wouldn't be of much use, because clients wouldn't know to use it, but still -- something that could easily be prototyped). I don't think FAAANG (or any other big players) would have much interest in making it happen in the standard though, since it would undercut their big-player advantage.
- fiddlerwoaroof 6y agoI wonder if Accept: application/json Would be a reasonable alternative? Wasn't this supposed to be the point of content negotiation?
- stingraycharles 6y agoMaybe, but not really; seems like this thread is more about intent (“I just want a preview”) while content type is more about representation (“I want the content as json”). I can imagine that there will be websites that are actively using the accept parameter to distinguish between “regular visitors” and have their APIs at the same paths (didn’t Reddit do this at some point?), and thus your approach would break in this case. I guess what this is really about is, I hate to say it, but something in the direction of the semantic web, where web servers (and in this case, CloudFlare et al) actually gain a deeper understanding of the content they serve, and a web browser / crawler being able to query this content directly.
- stickfigure 6y agoAccept: text/preview
- stingraycharles 6y agoIn what content type? Json? Xml? Html?
- fiddlerwoaroof 6y agoIt seems to me that what "previews" really want is an API for the page's content in a structured format: OpenGraph tags and other microformats are one representation, but it's annoying to have to load _all_ the HTML just to grab title and the OG tags.
- mtberatwork 6y agoDoesn't the oembed spec [1] already solve this? I think the OP could solve their problem by simply creating an oembed endpoint with all the necessary meta data. [1] https://oembed.com/ https://oembed.com/
- 67868018 6y agoYea but when your request to fetch the oembed data is blocked by a CAPTCHA... This is a real problem, we experience it in the Fediverse