Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I understand that: index.html is just one possible name for the "default page" filename. IMO its perfectly valid (if redundant) to specify it explicitly in a url. I still don't understand why this was described (not by you) as unacceptable.


In general, you want URLs that are short, clear, memorable, and stable. You want to tell people, "Come to mydomain.com/blog," not, "Come to http://www.wordpress.mydomain.com/stamp_collectors_heaven_bl... The latter includes lots of information that their browser + your server can figure out, so you shouldn't be burdening your (potential) users with it.

So, regarding the "index.html" portion: The index is the default. There's no point having a default if you have to specify it, and there's no point specifying it if it's the default.


A web page should have one and only one URL. If you link to the index.html version of a page you're creating two URLs for that page (the index.html one and the bare / one). The / one is shorter, easier to type and more attractive, so you should pick that one.


Because it's presenting an implementation detail.

If I change my file formats from HTML to SHTML, .jsp, .php, etc., the URL changes.

If I change from files to directories for every possible URL instance, the URL changes.

The user shouldn't care.


Earlier you said: "If you want to refer to a specific non-index page, you'd specify http://www.example.com/path/to/uri/somepage.html "

So, is this presenting an implementation detail as well?

I only asked my original question because I thought I was missing something...


Fair gripe.

If you'd started with the 'document'-.'html' naming convention, you could use any of numerous webserver hacks to preserve this illusion. How you request something has little to do with what the server does to satisfy your request.

What I was distinguishing earlier was the distinction between 'return default index of this level of the path' and 'return a specific document from this level of the path'. Specifically indicating 'index.html' is a tad gauche.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: