What figures are permitted in filenames for HTML files on ALL servers (*nix, Home windows, etc.) ? I am searching for the "cheapest common denominator" which will focus on all servers. USE: I am naming personal files to become offered up openly (Mysite.com/My-Page.htm)
E.g., space? _ - , etc.
E.g., can one have File-Title.htm, File_Title.htm File Title.htm?
Clearly, this needs to utilize all servers and browsers. (IIRC, the title is restricted through the server not the browser, however i might be wrong).
What figures are permitted in filenames for HTML files on servers?
That totally is dependent around the server. HTTP itself enables any character whatsoever, including control figures and non-ASCII figures, as lengthy because they are superbly %-encoded when asked for inside a URL.
On the Unix server you can't use ‘/’ or even the zero byte. (If you could utilize them, they'd come in the URL as ‘%2F’ and ‘%00’ correspondingly.) Additionally you can't possess the specific filenames ‘.’ or ‘..’, or even the empty string.
On the Home windows server you've all of the restrictions of the Unix server, plus additionally you can't use any one of
\/:*?"<>| or control figures 1-31 and also you can't have leading or trailing us dot or spaces, you'll also find difficulty using the legacy device filenames (Disadvantage, PRN, COM1 and much more).
This really is nothing related to HTTP precisely how filenames focus on Home windows, that is complicated.
can one have File-Title.htm, File_Title.htm File Title.htm?
Certainly. But within the last situation you need to connect to it by URL-encoding the area:
Browsers will often allow you to pull off departing the area in, but it is not necessarily valid. If you wish to avoid needing to consider URL-getting away, HTML-getting away and situation-sensitive issues, stay with a–z, 0–9 and underscore.
Be certain to eliminate
* . " / \ [ ] : ; | = ,
that are never permitted, because of incongruencies in file naming conventions standard practice is by using a-z and -9 and also the underscore character. Space is necessary for many customers but when you will get from utilizing it you will find parsing problems that improve reliability, read rfc's on mime ( multi-part internet mail extensions ) to obtain a taste of what's involved.
Regardless of what you need to do, something somewhere could make existence difficult - a lot to ensure that Now i use cryptographic techniques to create random a-z lowercase strings and employ individuals as filenames, embedding the helpful info within the file source code.
Steer clear of the ampersand no matter what, ...
There is not this type of factor being an html filename.
Certain figures need to be encoded in html (eg if utilized in links) however the permitted figures within the document names will rely on the net server (and perhaps the file system around the server).
Any file title is going to be URL-encoded so you ought to be fine. But for the record the 3 of the file names works all right.
If you do not would like your filenames to become encoded through the server, you need to avoid reserved figures: $&lifier+,/:=?@ and unsafe figures: space, quotes, <>#%^~`
But because the previous solutions mentioned, the net servers should deal with anything you want to make use of by encoding the chars.