Is there a limit on characters in a filename?

Discussion in 'HTML' started by patrick j, Sep 30, 2006.

  1. patrick j

    patrick j Guest

    Hi

    I'm wondering if there is a limit on the number of characters in a
    filename for use in a web-site?

    I used to do web-site creation on an amateur basis using the classic
    Mac OS and on that there was a limit of the number of characters in the
    filename so the issue never arose.

    However now I'm using OS X I have found myself creating quite long
    filenames.

    Should I be concerned about this?

    Thank you :)

    --
    Patrick
    Brighton, UK
     
    patrick j, Sep 30, 2006
    #1
    1. Advertising

  2. Scripsit patrick j:

    > I'm wondering if there is a limit on the number of characters in a
    > filename for use in a web-site?


    On the web, there are URLs, not files. If URLs happen to map to filenames in
    a particular server, that's coincidental.

    There have been reports on browser limitations with URLs longer than 2,000
    characters. If they are an issue to you, then you (or your users) surely
    have serious issues.

    > However now I'm using OS X I have found myself creating quite long
    > filenames.
    >
    > Should I be concerned about this?


    Yes, definitely. What makes you create quite long filenames? They won't make
    your site more useable, will they? Did you ever try writing down even a 200
    characters long messy URL in order to be able to visit later, after you
    found something interesting when using a foreign computer?

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Sep 30, 2006
    #2
    1. Advertising

  3. patrick j

    dorayme Guest

    In article <dbyTg.23376$>,
    "Jukka K. Korpela" <> wrote:

    > Scripsit patrick j:
    >
    > > I'm wondering if there is a limit on the number of characters in a
    > > filename for use in a web-site?

    >
    > On the web, there are URLs, not files. If URLs happen to map to filenames in
    > a particular server, that's coincidental.
    >
    > There have been reports on browser limitations with URLs longer than 2,000
    > characters. If they are an issue to you, then you (or your users) surely
    > have serious issues.
    >
    > > However now I'm using OS X I have found myself creating quite long
    > > filenames.
    > >
    > > Should I be concerned about this?

    >
    > Yes, definitely. What makes you create quite long filenames? They won't make
    > your site more useable, will they? Did you ever try writing down even a 200
    > characters long messy URL in order to be able to visit later, after you
    > found something interesting when using a foreign computer?


    Your point about urls is good but this is a different issue to at
    least one particular one in the question: apart from url length
    limits, apart from user difficulties, what are the limits on file
    names themselves? To do with particular server set ups? I have
    wondered this myself. Never a problem in fact because I try to
    keep the names short. But it is a bit of a temptation for Mac OS
    X users (perhaps others too) and can conceivably be useful for
    private file management. The question of typing urls need not
    actually arise, this is a different issue.

    --
    dorayme
     
    dorayme, Oct 1, 2006
    #3
  4. patrick j

    richard Guest

    "Jukka K. Korpela" <> wrote in message
    news:dbyTg.23376$...
    > Scripsit patrick j:
    >
    >> I'm wondering if there is a limit on the number of characters in a
    >> filename for use in a web-site?

    >
    > On the web, there are URLs, not files. If URLs happen to map to filenames
    > in a particular server, that's coincidental.
    >
    > There have been reports on browser limitations with URLs longer than 2,000
    > characters. If they are an issue to you, then you (or your users) surely
    > have serious issues.
    >
    >> However now I'm using OS X I have found myself creating quite long
    >> filenames.
    >>
    >> Should I be concerned about this?

    >
    > Yes, definitely. What makes you create quite long filenames? They won't
    > make your site more useable, will they? Did you ever try writing down even
    > a 200 characters long messy URL in order to be able to visit later, after
    > you found something interesting when using a foreign computer?



    So I run across this url in a newspaper and it has a length of 300
    characters. I'm supposed to hand type all of this in? Like hell I will.
    chances are the newspaper won't even print it to begin with.
     
    richard, Oct 1, 2006
    #4
  5. On Sat, 30 Sep 2006 18:38:37 +0100, patrick j
    <> let this slip:

    > Hi
    >
    > I'm wondering if there is a limit on the number of characters in a
    > filename for use in a web-site?
    >
    > I used to do web-site creation on an amateur basis using the classic
    > Mac OS and on that there was a limit of the number of characters in the
    > filename so the issue never arose.
    >
    > However now I'm using OS X I have found myself creating quite long
    > filenames.
    >
    > Should I be concerned about this?


    As already pointed out, files are irrelevant to the WWW, they are merely a
    possibility to organize data which may or may not be used on the server
    and could by coincidence be used to map URIs to data. (I avoided the term
    UR*L* as it is not necessarily given that the data has a location that is
    concievable from the URI, which may or may not actually uniformly identify
    the data, now I come to think of it.

    Back to the question:
    YES, it is a problem, as URIs should in most cases be easy to remember or
    at least easy to type, not to mention permament.

    NO, as *NIX (what runs most of the web) systems all, in theory, allow
    infinitely long file names, which ispired Microsoft's Windows to allow
    long(ish?) file names as well - which should collectively cover 99.99% of
    the web. most of the rest probably has an 8.3 file name restriction, but
    you'd know due to the careless violation of the rule you'd been guilty of.

    --
    Thomas Jollans alias free-zombie
     
    Thomas Jollans, Oct 3, 2006
    #5
  6. patrick j

    dorayme Guest

    In article <efukvv$ima$03$-online.com>,
    "Thomas Jollans" <> wrote:

    > On Sat, 30 Sep 2006 18:38:37 +0100, patrick j
    > <> let this slip:
    >
    > > Hi
    > >
    > > I'm wondering if there is a limit on the number of characters in a
    > > filename for use in a web-site?
    > >


    > NO, as *NIX (what runs most of the web) systems all, in theory, allow
    > infinitely long file names, which ispired Microsoft's Windows to allow
    > long(ish?) file names as well - which should collectively cover 99.99% of
    > the web. most of the rest probably has an 8.3 file name restriction,


    Finally, an answer!

    --
    dorayme
     
    dorayme, Oct 3, 2006
    #6
  7. On 2006-09-30, patrick j wrote:
    > Hi
    >
    > I'm wondering if there is a limit on the number of characters in a
    > filename for use in a web-site?
    >
    > I used to do web-site creation on an amateur basis using the classic
    > Mac OS and on that there was a limit of the number of characters in the
    > filename so the issue never arose.
    >
    > However now I'm using OS X I have found myself creating quite long
    > filenames.
    >
    > Should I be concerned about this?


    Unix systems (which most web servers run on) usually have a
    maximum length for filenames defined by the NAME_MAX macro. A
    typical value is 255. There is also the PATH_MAX macro, typically
    4095, which is the maximum length for the entire path to a file.


    --
    Chris F.A. Johnson <http://cfaj.freeshell.org>
    ===================================================================
    Author:
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
     
    Chris F.A. Johnson, Oct 4, 2006
    #7
  8. patrick j

    patrick j Guest

    On Wed, 4 Oct 2006 00:23:43 +0100, Chris F.A. Johnson wrote
    (in article <>):

    > Unix systems (which most web servers run on) usually have a
    > maximum length for filenames defined by the NAME_MAX macro. A
    > typical value is 255. There is also the PATH_MAX macro, typically
    > 4095, which is the maximum length for the entire path to a file.


    Thank you :)

    The longest filename I have has 37 characters including the .html
    suffix.

    Should be okay I think.

    --
    Patrick
    Brighton, UK
     
    patrick j, Oct 4, 2006
    #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. =?Utf-8?B?Sm9l?=

    Extract filename from a filename typed by user

    =?Utf-8?B?Sm9l?=, Aug 23, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,065
    Travis Murray
    Aug 24, 2004
  2. Replies:
    1
    Views:
    1,596
    Roland de Ruiter
    Jun 15, 2006
  3. Ed
    Replies:
    10
    Views:
    46,692
    alok000707
    Jul 13, 2010
  4. Beauregard T. Shagnasty

    Re: filename.gif or filename.gif.jpg?

    Beauregard T. Shagnasty, May 30, 2008, in forum: HTML
    Replies:
    1
    Views:
    806
    Jonathan N. Little
    May 30, 2008
  5. Bergamot
    Replies:
    0
    Views:
    482
    Bergamot
    May 30, 2008
Loading...

Share This Page