javascript - Does interrupting ajax function stop it from being completed? -
what i'am trying converting video using ffmpeg take long time complete sending ajax request server without making user wait until video conversion done.
if user refresh page after request sent dose stop function form completing ? way or should make queue video converting ?
you can use following structure;
- when user started video conversion, send request backend via ajax convert
- when request sent, can set cookie on server side (it can readable on browser also).
- after request sent, can show processing bar.
- when user refresh page, check cookie value if video conversion started or not. if exists, can continue showing progress bar again.
- when conversion finished, can set cookie value done, , ajax check call tell status of conversion user.
i assume making ajax call in specific time interval status of conversion. if not using ajax poll, can use websockets send result browser client. cookie values can modifiable client, if encrypt cookie value, or make video conversion page restricted page. if video conversion page restricted registered users only, can set conversion status in db instead of cookie.
Comments
Post a Comment