Skip to content

On trailing slashes for URLs / subjects #137

@joepio

Description

@joepio

Trailing slashes are weird and confusing:

  • Formally, trailing slashes are semantically relevant.
  • Typically, people used trailing slashes to show something is a directory instead of a regular resource. But this is less and less coming.
  • Many URL implementations (including web browsers) automatically add a trailing slash to origins, so http://example.com becomes http://example.com/
  • Many webservers ignore trailing slashes, and return the same resources (try opening this page with and without a trailing slash)
  • Some webservers redirect to the "correct" page, even

I'm currently struggling with how to deal with trailing slashes. I've had some issues with them before, especially with home pages (where the trailing slash was added in browsers)

Atomic-Server and perhaps even the Atomic Data spec need a very clear opinion on this. For now, I think we should go with the following:

  • Trailing slashes should be ignored. If they are present, they can be removed. This includes trailing slashes for origins.
  • The default way to serialize a URL does not include a trailing slash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions