Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 916163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:00:17+00:00 2026-05-15T18:00:17+00:00

I’m doing some async file uploading with iframes, and I’m wondering if simply pruning

  • 0

I’m doing some async file uploading with iframes, and I’m wondering if simply pruning the iframe from the DOM is enough to cancel an upload.

This discussion seems to imply that this a poor approach to the problem overall, but annoyingly the JS `expert’ refuses to reveal his solution.

Anyway, removing the iframe works in Gecko + WebKit, but I’m wondering if people have experience with other DOM implementations.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T18:00:18+00:00Added an answer on May 15, 2026 at 6:00 pm

    That dude in the discussion doesn’t have a clue of what he is talking about, IMO. Many call themselves experts, but they are only big guns with empty shells. If you want to do some async file uploading, you could use Flash. I normally don’t recommend Flash, but the SWFUpload widget is, IMO, one of the best there is.

    http://www.swfupload.org/

    Other than that, you could take a look at this, the code is quite ugly, but the author seems to affirm that this is cross-browser.

    http://www.webtoolkit.info/ajax-file-upload.html

    To answer your question: no, removing the iframe does not guarantee that the download will really stop, or that the download process has effectively been cancelled on the server side. This is because removing the iframe from the DOM does not guarantee that something, somewhere is not still using it, thus is not garbage collected.

    Instead of removing the iframe, you can simply set a different target url (ex: “about:blank”) that usually sever the connection with the server and ultimately stops any data transfer in progress. You can then remove the iframe after that.

    However, I would suggest having a two step process, where you upload the file, along with an hidden field containing some hash value. The file is store in a temp directory on the server. When the upload is complete, you make a second request with the same hash to validate the file upload completion and finish processing the upload. This ensures that if the download is cancelled mid-way, but the file has already been uploaded to the server, that you simply don’t finish the process and you can just have another process cleaning up the temporary uploaded files later on.

    The first solution is simpler, but requires Flash 🙁

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.