links without file extentions + browser compatability

J

Jim Higson

On my site, I like to have links such as:

<a href="somepage" ...

instead of:

<a href="somepage.html" ...

Because this way I can use content negotiation on the (Apache) server to
decide wether to send somepage.html (IE) or somepage.xhtml (most others).

However, I've been getting a lot more 404s than usual recently, and maybe
some browsers don't like this?

I've tested on a long list of browsers, but not the older versions of IE
which - it's tricky to test from multiple versions of IE in my situation.

I find it hard to see why any browser would need a file extension like this
when it's given the correct MIME type. But I've seen sillier quirks before!

Thanks for any help,
Jim
 
T

Toby Inkster

Jim said:
However, I've been getting a lot more 404s than usual recently, and maybe
some browsers don't like this?

If you have been renaming lots of files then that might be the reason for
404s -- there are still links pointing at old copies.
 
J

Jim Higson

Toby said:
If you have been renaming lots of files then that might be the reason for
404s -- there are still links pointing at old copies.

I've not been renaming the files, just removing some specifics from link
hrefs and relying on content negotiation to decide which to send.

So I have links on the site like:

<a href="somepage" ...
instead of
<a href="somepage.html" ...

But the user still gets somepage.html. Bookmarks to "somepage.html" should
still work, but bypass the server's content negotiation.

For example goto

http://www.masmodels.com/inspiration

This is the same as requesting one of:

http://www.masmodels.com/inspiration.en
http://www.masmodels.com/inspiration.en.html
or http://www.masmodels.com/inspiration.en.xhtml (for the XHTML version)

Here .en is how Apache knows the pages are in English, when the translators
are done there will also be files like:

http://www.masmodels.com/inspiration.fr.html

which the user will be automatically be given if they visit the first URL
from a browser configured for French. (the borwser sends the header
"lang-accept" in the HTTP request, to tell order of the user's language
preferences)

Anyway, I'm getting more 404s than I should be. When things like this happen
my natural instinct is to blaim IE, but IE6 handles all this correctly.
Could someone have a look with a version <6?
 
D

Dave Patton

For example goto

http://www.masmodels.com/inspiration

This is the same as requesting one of:

http://www.masmodels.com/inspiration.en
http://www.masmodels.com/inspiration.en.html
or http://www.masmodels.com/inspiration.en.xhtml (for the XHTML
version)

Here .en is how Apache knows the pages are in English, when the
translators are done there will also be files like:

http://www.masmodels.com/inspiration.fr.html

which the user will be automatically be given if they visit the first
URL from a browser configured for French. (the borwser sends the
header "lang-accept" in the HTTP request, to tell order of the user's
language preferences)

But it is not working, because by your reasoning with my
browser configured to prefer French, I shouldn't be served
the English version:

http://www.masmodels.com/inspiration

GET /inspiration HTTP/1.1
Host: www.masmodels.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7)
Gecko/20040707 Firefox/0.9.2
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q
=0.8,image/png,*/*;q=0.5
Accept-Language: fr,en-us;q=0.8,en;q=0.6,de-de;q=0.4,pt-br;q=0.2
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache

HTTP/1.x 200 OK
Date: Fri, 20 Aug 2004 02:00:06 GMT
Server: Apache/1.3.29 (Unix)
Content-Location: inspiration.en.xhtml
Vary: negotiate,accept
TCN: choice
Last-Modified: Thu, 19 Aug 2004 01:54:00 GMT
Etag: "14c006e-3f96-41240838;4124b9bb"
Accept-Ranges: bytes
Content-Length: 16278
Keep-Alive: timeout=2, max=200
Connection: Keep-Alive
Content-Type: application/xhtml+xml
Content-Language: en
 
T

Toby Inkster

Jim said:
I've not been renaming the files, just removing some specifics from link
hrefs and relying on content negotiation to decide which to send.

Well, it was worth a try.

Have you looked at the log to make sense of these 404s? Check which URLs
are 404ing -- should they be 404ing?

Is there anything that these 404s have in common (UA or IP?)
[snip explanation of how MultiViews works]

Yes I know, I use it myself.
Anyway, I'm getting more 404s than I should be. When things like this
happen my natural instinct is to blaim IE, but IE6 handles all this
correctly. Could someone have a look with a version <6?

I test my site in IE going back to ver 2.0, Netscape back to 1.1, Opera to
2.12 and Mosaic back to 0.6beta (amongst many others). I don't think I've
ever found a browser that had problems with MultiViews.
 
J

Jim Higson

Toby said:
Hence Jim's qualifier of "when the translators are done".

Correct. Unfortunately I took it on confidence that the person I'm doing the
site for knows *loads* of friends who'll translate for free. Hence the
ambitious, but atm useles list of languages in the top-right. Humph.
 
J

Jim Higson

Toby said:
Jim said:
I've not been renaming the files, just removing some specifics from link
hrefs and relying on content negotiation to decide which to send.

Well, it was worth a try.

Have you looked at the log to make sense of these 404s? Check which URLs
are 404ing -- should they be 404ing?

Is there anything that these 404s have in common (UA or IP?)
[snip explanation of how MultiViews works]

Yes I know, I use it myself.
Anyway, I'm getting more 404s than I should be. When things like this
happen my natural instinct is to blaim IE, but IE6 handles all this
correctly. Could someone have a look with a version <6?

I test my site in IE going back to ver 2.0, Netscape back to 1.1, Opera to
2.12 and Mosaic back to 0.6beta (amongst many others). I don't think I've
ever found a browser that had problems with MultiViews.

No, it would be very odd, especially with mime types like "text/html"
however, IIRC there was a related bug in IE where urls pointing to svg
images HAD to end in .svg of course this caused problems because
negotiation was being used to send raster images in some cases.

This is talked about here:
http://www.protocol7.com/svg-wiki/?MimeType

I just got a report from the guy I'm doing the site for. Unfortunately it's
so vague as to be almost useless:

Mark said:
jim I have tried getting to the site from my friend
Jussi's computer. There is only the home page and the
portfolio page coming up all the other links bring a
response saying to press back or return!
Something must be wrong.

Apart from the frustration of not even being told what browser he's using,
or any serious attempt to describe the problem, this sounds like a 404.

However, a "response saying to press back or return" doesn't look like my
404, which you can see here:

http://www.masmodels.com/404

Does "press back or return" sound familiar to anyone? Anyone know what
browser 'Jussi' uses?

Humph.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top