[ Sponsored Links ]

Advertise here »

Re: Ten ways to speed up the download time of your website

 

On 09:07:53 19 July 2004 Dan Zambonini wrote:

What is beyond me is why webserver forces browser to redirect instead of doing it automatically thus saving all that waiting time

When the browser makes the request: www.domain.com/namehere

without the slash, the browser has to assume that it’s a file that it’s requesting.  So, at this point, the relative directory is still root (/).  Now, if the web server were to recognise it as a directory, and automatically return the contents of that directory, then any relative file-paths in the HTML would be invalid

Does that make sense? It does in my head, but it’s early on a Monday, so I could have it confused...

Well they could have used <BASE> tag to override original request's domain/paths for the purposes of relative URLs resolution, this of course assumes the client supports HTML, but then again, task of resolving relative URLs kind of implies that we are talking about HTML.

Interesting that IE does care about / at the end of path in the BASE tag, here is quick example I just done:

<html>
<base href="http://www.e-consultancy.com/forum/">
<body>
<a href="default.asp?v=101498&p=1&reply=101498">test link</a>
</body>
</html>

Without / IE won't resolve link correctly:

<html>
<base href="http://www.e-consultancy.com/forum">
<body>
<a href="default.asp?v=101498&p=1&reply=101498">test link</a>
</body>
</html>

-----

Well, long but fruitful discussion - I sure will pay more attention to "minor" details liks that! 8=O

 
Subscribe for only €299