Brad Fitzpatrick (bradfitz) wrote in lj_dev,
Brad Fitzpatrick
bradfitz
lj_dev

URL thoughts

After the URL change now in CVS there have been some requests for a shorter item view URL.

Consider, though:

-- we want to minimize English in URLs, so account/entry/nnnn is out.
-- we can't just do account/nnnn because nnnn might overlap with yyyy in account/yyyy/mm/dd/nnnn

So, what do you guys think of this... Two URL formats for items, the former canonical, the latter shorthand for people that want it:

account/yyyy/mm/dd/nnnnn.html
account/nnnnn.html

The presence of the .html servers two purposes:

1) tells spiders and such that, "Hey, we're HTML! Be happy about indexing me!"
2) disambiguates itemids from years.

As for the matter of appending /reply instead of ?mode=reply ... I'm very against it. It's not a new resource. It's a different view of the same resource. In fact, new DHTML tricks coming soon will make the views change themselves without an HTTP round-trip. (unless DHTML silent self-test doesn't pass and we fall back to old behavior...) Also, there are potential other modes: deleting, unscreening, etc... not now, but maybe later.

If anything, I'd prefer account/nnnn-reply.html before making the item resource look like a directory! It's not a directory.

BTW, this is all going in the direction of letting users give their posts filenames. (as long as they're non-numeric). So you could have:

account/i_hate_foo.html
account/i_hate_foo.html?mode=reply

... etc.

Thoughts?

Also, test what's in CVS!
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 32 comments