Features of writing an unbuffered asynchronous algorithm for receiving data in JavaScript
<p>The article discusses two common approaches to implementing file downloads in JavaScript web applications: using the HTML <a> tag and asynchronous downloading with AJAX (fetch/XHR). The author conducts a comparative analysis of their advantages and disadvantages, paying special attention to the impact of the user's device RAM on the reliability of each method. The main emphasis is on the problem of failures when using the response.blob() method to download large files under limited memory conditions. An alternative method using response.bytes() is proposed as an effective solution, providing buffered, step-by-step downloading and increasing the stability of the application. The material will be useful for front-end developers faced with the task of implementing a reliable and controlled file download process.</a></p>
Authors
- S.S. Isakov (ORCID: https://orcid.org/0000-0003-1719-2355)
Institutions
- Moscow State University of Psychology & Education (RU)
Publication Details
- Journal
- Modelling and Data Analysis
- Published
- 2025-09-22
- DOI
- https://doi.org/10.17759/mda.2025150312
- Primary Topic
- Advanced Data Processing Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00