Ricardo said:
hi, now i have the next problem. i have some links to files (.zip, .rar...)
and i would like to get its size
could you say me how to do or give me some references???
Thanks
1) Use the XML HTTP Request object available in IE and Gecko-based browsers to
do a HEAD request for the file. The headers that get returned should contain
the file size (Content-Length) <url:
http://jibbering.com/2002/4/httprequest.html />.
2) If you have any sort of server-side technology available to you (ASP, JSP,
Perl, PHP, etc), you could use it to retrieve the size of the file and then
"pass" that value to the client-side JavaScript:
<?php
# use PHP to determine the size of the file
?>
<script type="text/javascript">
var fileSize = <?php echo $fileSize ?>;
</script>