Is it okay to use a "." (dot) in file names instead of camelcase or dashes etc.. for example:
ico_active.user.png
Will it cause any performance or browser compatibility issues or some other disadvantage?
Thanks!
Illegal Filename CharactersDon't start or end your filename with a space, period, hyphen, or underline. Keep your filenames to a reasonable length and be sure they are under 31 characters. Most operating systems are case sensitive; always use lowercase. Avoid using spaces and underscores; use a hyphen instead.
Dot is the separator of the file name and it's extension.
It means the file is hidden. Period. You may create such a file, or it can be generated by the system. There are many hidden files in your home folder storing your configurations.
A filesystem driver can hide any files it wants, by simply omitting their names when it provides results to system calls that are used to get a directory listing. As sergut described in his answer, files starting with a dot are not truly hidden.
Different OSes have different rules for filenames. For example, filenames cannot consist only of dots. In Windows filenames cannot end with a dot.
There is a convention where file types or formats trail dots; for example a something.tar.gz file is interpreted as the file or folder "something" that has been tar-ed then gzipped.
Dots are also problematic when matching filenames using regular expressions because . is a metacharacter while underscores and letters are not.
If you save the response, then the last part will be used as the file name by some older browsers, but apart from that it's ignored. It used to be fun little joke to play on people to make a URI like ".jpeg" do something interactive because it was really a text/html with some javascript or flash, but these days people are too likely to know how it's done to serve as a prank any more.
IIS does have issues if the period is the final character of the URI, for reasons that escape me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With