Features of writing an unbuffered asynchronous algorithm for receiving data in JavaScript

 
Audio is AI-generated
12

Abstract

The article discusses two common approaches to implementing file downloads in JavaScript web applications: using the HTML 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.

General Information

Keywords: programming, web technologies, loading algorithms, RAM optimization, network data transmission

Journal rubric: Short Messages

Article type: scientific article

DOI: https://doi.org/10.17759/mda.2025150312

Received 14.07.2025

Revised 28.07.2025

Accepted

Published

For citation: Isakov, S.S. (2025). Features of writing an unbuffered asynchronous algorithm for receiving data in JavaScript. Modelling and Data Analysis, 15(3), 180–185. (In Russ.). https://doi.org/10.17759/mda.2025150312

© Isakov S.S., 2025

License: CC BY-NC 4.0

Information About the Authors

Sergey S. Isakov, Lecturer, Postgraduate Student of the Computer Science Faculty, Moscow State University of Psychology & Education, Moscow, Russian Federation, ORCID: https://orcid.org/0000-0003-1719-2355, e-mail: isakovss@mgppu.ru

Metrics

 Web Views

Whole time: 81
Previous month: 38
Current month: 5

 PDF Downloads

Whole time: 12
Previous month: 3
Current month: 0

 Total

Whole time: 93
Previous month: 41
Current month: 5