Simple Form Starts Long Running Task and Watches Progress
Is there any reason you're using global variables rather than passing function arguments? e.g. 


exportProgress = data; progressHandler();



instead of progressHandler(data); ?

It's a much better practice to avoid globals as much as possible.
Instead of polling for progress every second, you could subscribe to SSE (Server Side Events), thus getting the latest progress updates and no unneeded traffic.

In JS this amounts to:

window.onload = function (e) {
    var source = new EventSource("get_progress");
    source.onmessage = function(event) {
        try {
            const response = JSON.parse(event.data);
            progressHandler(response)
            if (response.completed) {
                source.close();
            }
        } catch (error) {
            console.log(error);
        }
    }
}

function progressHandler(response) {
     progressBar.val(response.progress / response.total);
     if(response.completed) reset();
}