Skip to content
  • Categories
  • Recent
  • Popular
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

NodeBB-ActivityPub Bridge Test Instance

  1. Home
  2. Categories
  3. Uncategorized
  4. i'm playing around with a thought in my head re: URIs and what they identify, in a world where dereferencing that URI usually gets you some text/html

i'm playing around with a thought in my head re: URIs and what they identify, in a world where dereferencing that URI usually gets you some text/html

Scheduled Pinned Locked Moved Uncategorized
5 Posts 2 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • trwnh@mastodon.socialT This user is from outside of this forum
    trwnh@mastodon.socialT This user is from outside of this forum
    trwnh@mastodon.social
    wrote last edited by
    #1

    i'm playing around with a thought in my head re: URIs and what they identify, in a world where dereferencing that URI usually gets you some text/html

    i think using the bare URI to identify the page or document itself is unnecessary, because you can just slap an id="page" attribute on the <html> element if you need to make statements about the page itself.

    similarly, slap an id="article" on your <article> if need be.

    of course you can also align your fragment ids to other formats like json...

    trwnh@mastodon.socialT 1 Reply Last reply
    0
    • trwnh@mastodon.socialT trwnh@mastodon.social

      i'm playing around with a thought in my head re: URIs and what they identify, in a world where dereferencing that URI usually gets you some text/html

      i think using the bare URI to identify the page or document itself is unnecessary, because you can just slap an id="page" attribute on the <html> element if you need to make statements about the page itself.

      similarly, slap an id="article" on your <article> if need be.

      of course you can also align your fragment ids to other formats like json...

      trwnh@mastodon.socialT This user is from outside of this forum
      trwnh@mastodon.socialT This user is from outside of this forum
      trwnh@mastodon.social
      wrote last edited by
      #2

      it's a bit unfortunate that a lot of fedi naively expects id to never be a fragment identifier. and in some particularly unfortunate cases, somehow they baked it into their security model, too -- the top-level object's id is expected to match what they requested *after* chopping off the fragment, not *before*.

      raphael@mastodon.communick.comR 1 Reply Last reply
      0
      • trwnh@mastodon.socialT trwnh@mastodon.social

        it's a bit unfortunate that a lot of fedi naively expects id to never be a fragment identifier. and in some particularly unfortunate cases, somehow they baked it into their security model, too -- the top-level object's id is expected to match what they requested *after* chopping off the fragment, not *before*.

        raphael@mastodon.communick.comR This user is from outside of this forum
        raphael@mastodon.communick.comR This user is from outside of this forum
        raphael@mastodon.communick.com
        wrote last edited by
        #3

        @trwnh

        Some of it might be due to web browsers. I am not sure it's 100% of them, but I've seen some browsers stripping fragments to the URL string when making a request, so if you had an inbox url that was "https://example.com/my-actor#inbox", it would try to make the POST request to "https://example.com/my-actor".

        trwnh@mastodon.socialT 1 Reply Last reply
        0
        • raphael@mastodon.communick.comR raphael@mastodon.communick.com

          @trwnh

          Some of it might be due to web browsers. I am not sure it's 100% of them, but I've seen some browsers stripping fragments to the URL string when making a request, so if you had an inbox url that was "https://example.com/my-actor#inbox", it would try to make the POST request to "https://example.com/my-actor".

          trwnh@mastodon.socialT This user is from outside of this forum
          trwnh@mastodon.socialT This user is from outside of this forum
          trwnh@mastodon.social
          wrote last edited by
          #4

          @raphael that's part of how HTTP works -- your HTTP request doesn't include the fragment, but the HTTP user agent can handle the fragment resolution after it receives its HTTP response.

          for inboxes: inboxes are more like endpoints. i guess you could use a fragment, but it wouldn't mean anything for HTTP POST. it would only mean something for when you HTTP GET and are looking for a subresource fragment.

          trwnh@mastodon.socialT 1 Reply Last reply
          0
          • trwnh@mastodon.socialT trwnh@mastodon.social

            @raphael that's part of how HTTP works -- your HTTP request doesn't include the fragment, but the HTTP user agent can handle the fragment resolution after it receives its HTTP response.

            for inboxes: inboxes are more like endpoints. i guess you could use a fragment, but it wouldn't mean anything for HTTP POST. it would only mean something for when you HTTP GET and are looking for a subresource fragment.

            trwnh@mastodon.socialT This user is from outside of this forum
            trwnh@mastodon.socialT This user is from outside of this forum
            trwnh@mastodon.social
            wrote last edited by
            #5

            @raphael really, that's kind of the whole point of a "fragment" identifier, it identifies a "fragment" of the resource, and its semantics are determined by the media type.

            for text/html, a fragment corresponds to an id= attribute or otherwise can be read by javascript. see https://www.iana.org/assignments/media-types/text/html for "Fragment identifier considerations"

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Login or register to search.
            Powered by NodeBB Contributors
            • First post
              Last post
            0
            • Categories
            • Recent
            • Popular