links without file extentions + browser compatability

Discussion in 'HTML' started by Jim Higson, Aug 19, 2004.

  1. Jim Higson

    Jim Higson Guest

    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
     
    Jim Higson, Aug 19, 2004
    #1
    1. Advertising

  2. Jim Higson

    Toby Inkster Guest

    Jim Higson wrote:

    > 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.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Aug 19, 2004
    #2
    1. Advertising

  3. Jim Higson

    Jim Higson Guest

    Toby Inkster wrote:

    > Jim Higson wrote:
    >
    >> 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.


    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?
     
    Jim Higson, Aug 19, 2004
    #3
  4. Jim Higson

    Dave Patton Guest

    Jim Higson <> wrote in
    news::

    > 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

    --
    Dave Patton
    Canadian Coordinator, Degree Confluence Project
    http://www.confluence.org/
    My website: http://members.shaw.ca/davepatton/
     
    Dave Patton, Aug 20, 2004
    #4
  5. Jim Higson

    Toby Inkster Guest

    Jim Higson wrote:
    > Toby Inkster wrote:
    >> Jim Higson wrote:
    >>
    >>> 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.

    >
    > 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.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Aug 20, 2004
    #5
  6. Jim Higson

    Toby Inkster Guest

    Toby Inkster, Aug 20, 2004
    #6
  7. Jim Higson

    Jim Higson Guest

    Toby Inkster wrote:

    > Dave Patton wrote:
    >> Jim Higson wrote:
    >>
    >>> 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

    >>
    >> But it is not working

    >
    > 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.
     
    Jim Higson, Aug 20, 2004
    #7
  8. Jim Higson

    Jim Higson Guest

    Toby Inkster wrote:

    > Jim Higson wrote:
    >> Toby Inkster wrote:
    >>> Jim Higson wrote:
    >>>
    >>>> 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.

    >>
    >> 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.
     
    Jim Higson, Aug 20, 2004
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. BBeasley

    Browser compatability

    BBeasley, Jan 17, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    399
    Showjumper
    Jan 18, 2004
  2. =?Utf-8?B?V1N0b3JleUlJ?=

    Browser Compatability

    =?Utf-8?B?V1N0b3JleUlJ?=, Jul 7, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    326
    bruce barker
    Jul 7, 2004
  3. DGG

    Java file extentions

    DGG, Jul 28, 2005, in forum: Java
    Replies:
    6
    Views:
    789
    Tor Iver Wilhelmsen
    Jul 30, 2005
  4. =?Utf-8?B?TW9uaWNh?=
    Replies:
    0
    Views:
    434
    =?Utf-8?B?TW9uaWNh?=
    Feb 25, 2007
  5. =?Utf-8?B?TW9uaWNh?=

    change default file extentions in FileUpload Control

    =?Utf-8?B?TW9uaWNh?=, Feb 25, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    526
    MasterGaurav \(www.edujini-labs.com\)
    Feb 26, 2007
Loading...

Share This Page