Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

138
Views
How do I prevent JQuery.ajax from keeping all response contents in memory

I am using $.ajax to download a large CSV, which I am processing as it downloads using onprogress. I'd rather not retain all of the file contents in memory so that my tool has less of a memory footprint. But I don't know how to prevent jquery from retaining the entire csv contents to pass into the done method.

$.ajax(url, {
            xhrFields: {
                onprogress: function (e) {
                    //load up lines from this part of the file using e.currentTarget.response
                }
            }
        })
            .done(function (res) {
                //don't need res here as processing is already done.
            })

Does anyone know if there is some way of achieving this using $.ajax or something equivalent?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!