Using Multiple Dots (.) In File Names

Are there any reasons not to use a few . in website file names (images, css files, js files ...), for example, in logo.french.png ?

+4
source share
3 answers

Too bad that the answers cannot be so short: No.

Update:

Mmh ok let me think (you wanted this!):

  • URLs do not limit the use of travel periods.
  • The usual file name restrictions for the OS on which your server is running apply.
    If you are running Linux or UNIX, then you should be fairly free at naming your files (regarding periods). Windows is not so sure;)

Update 2:

There may be some special configurations of your web server (for example, Apache content negotiation ) that also uses several periods in the file name to distinguish between the contents. But this should not interfere with naming your files this way.

+15
source

No.

The only reason I can think about not to use a few . in the file name, is that a very poorly written file extension check can get confused.

0
source

Yes.

I had a file on my site called ads.atx.ps.960.jpg that is mentioned inside the img src tag ... this spot appeared in both Chromium and Firefox on Linux when I received the page. When I finally came out of despair, changed my name to ads_atx_ps_960.jpg, it worked fine.

I do not know if there was a problem with the browser or the web server, just know that it does not work with dots in any browser. My request for server type returned "Apache / 2"

Notice that I also have a bunch of html files with several dots in the names, such as yocto.file.copy.html, etc., which they refer to in the href tags, and everything works fine, the first time I saw that the problem is related to jpg in the img src tag.

0
source

Source: https://habr.com/ru/post/1334851/


All Articles