When I moved my website from Geo-cities (medivial ages huh?) back in 2000 to a perl based webhost, it was technically huuuge set of choices thrown at me. SSI, Basic auth protection, directory control, scripting languages etc. Most of them can be safely considered obsolete now. But there is something Apache hit straight on target. htaccess. this feature is still quite big. However, many new developers might not really know the power of this feature. for them, Here is www.htaccesseditor.com which comes handy.
Textareas allow new lines to enter. These are represented by \n (1) or \r\n (2) characters. But when you save to DB you have a limit to certain length of chars. There is no maxlength attribute in HTML that will stop you from entering data. This is generally acomplished by Javascript. You do a onkeyup hook and stop event or trim after textarea.value.length > maxlength. There are many other solutions out there.. But.. Here is the problem that most of those solutions overlook, How do you deal with the count on \n and \r\n representations. Lets first see how it matters. If the text entered has new lines, the length is calculated differently in Firefox and IE. When you enter a Text like 01234 567890 You expect the textarea.value.length to be 11. (10 chars + new line).On the backend, however, java would recieve it as 12 chars (10 chars + \r\n) (this is irrespective of FF or IE). So you are effectively saving 12 chars to DB. Worse yet, IE seems to figure textarea.value.length as 12 (