Reputation: 68670
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!
Upvotes: 17
Views: 32683
Reputation: 516
Dots in filenames...
Consider:
Unsurprisingly, certain programs have problems when files have dots in their names, for example:
Clearly the semantics of dots in filenames is quite complicated, confused & confusing.
Just.stay.away!
Upvotes: 4
Reputation: 21712
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.
Upvotes: 5
Reputation: 113272
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.
Upvotes: 7
Reputation: 753970
Dot is about as safe a punctuation character as there is, except that many systems at least partially determine (assume?) the type of contents from what follows the last dot in the name.
Upvotes: 0
Reputation: 3006
Yes it is. It will look at the trailing .* for the "File Extension".
Upvotes: 3