News for hackers. Stuff that matters.
Re:Cool URIs don't change. by kree10 on Monday June 25, 2012 @09:19AM (#4156344)
While seeing "index.html" (or "index.ANYTHING") makes me cringe, I have some sympathy for the developers who do this.

Let's say I have an old-school, all-static site with pages at http://example.com/x/index.html and http://example.com/x/about.html. I would like to make a link to the "index" page from the "about" page. What are my choices?

<a href="/x/"> will work, but will break when someone decides to move "/x" to "/y".

<a href="."> will work from the server, which does an internal redirect, but not on the static version on my local drive I'm going to demo to my boss. (I also have a hunch a significant number of developers aren't aware of "." and don't know this is an option.)

So we end up with <a href="index.html"> for better or worse.

Re:Cool URIs don't change. by simonbrown on Monday June 25, 2012 @10:58AM (#4156779)

  <a href="/x/"> will work, but will break when someone decides to move "/x" to "/y".
If /x redirected to /y, that wouldn't be a problem.
Re:Cool URIs don't change. by astrodust on Monday June 25, 2012 @12:15PM (#4157176)
If you're having problems like this, your web development environment is total garbage and should be fixed.

99% of the time the reason for index.html is the developer was viewing static files in their browser because they didn't have a proper server or test environment. This is inexcusable in 2012.