I am working on a web application which supports file uploading. I am already familiar checking the size in server side, but i wanted to check the file size in a client side.
You may take a look at the File API which is a draft for HTML 5. Here's a nice article. That's what Gmail uses if the browser supports it of course. But there's no way to ensure this will work across all browsers.