I would like to determine te size (in bytes?) of a HTTP POST transaction to be submitted. I have a form with a lot of form data. When all fields are filled with the maximum number of characters (for example all 9's) and the form gets submitted through a POST method, there's no problem, and all data gets saved.
When I replace all characters (9's) by spaces, I get a 404 after submitting the form.
I'm assuming that I'm sending too much data here. I think the spaces are being converted to %20, so the amount of bytes posted are tripled.
I would like to determine the size of the HTTP POST transaction, before submitting the form, so I can display a message to the user if the size is over some limit. I'd prefer to use JavaScript.
Does anyone know how to determine this?