Javascript Reference
Categories: document

javascript document fileSize

@March 15, 2008, 1:22 a.m.
fileSize Firefox/Netscape/NN n/a IE 4 Chrome/Safari/DOM n/a

Read-only

Returns the number of bytes for the size of the currently-loaded document. IE for Windows returns this value as a string, while IE for Macintosh returns a number value (an important distinction if you need to perform math operations on the value).

 
Example
 
var byteCount = parseInt(document.fileSize, 10);
 
Value

Integer as string (Windows) or number (Mac).

 
Default

None.


Powered by Linode.