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

  • SEARCH
  • Home
  • 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 4087670
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:53:04+00:00 2026-05-20T18:53:04+00:00

Suppose in Javascript that you assign the SRC to an IMG tag. It is

  • 0

Suppose in Javascript that you assign the SRC to an IMG tag. It is a large SRC and you want to cancel it before it has finished loading. Assigning the SRC to another image will not stop the data from loading.

That is, in the middle of the load you can assign the SRC to another smaller image and the smaller image will be loaded and appear in your browser. However, the original SRC still continues downloading.

Similarly, deleting the IMG node will not prevent the SRC from continuing to download. No guesses please, look at the repro steps.

REPRO

  1. Load this URL in Chrome in Windows: http://68.178.240.17/imgLoadTest/imgLoadTest.htm

  2. Open up the developer panel by pressing CTRL-SHIFT-J

  3. On the top row of icons in the Chrome developer panel click the Network icon to watch network activity.

  4. On the web page loaded in Step 1 click the Load Image button and watch the developer panel as a large (32meg) image starts loading.

  5. On the web page click the Try To Cancel button to load a different image.

  6. A small image loads, but watch the network in the developer panel and notice that the large image continues to download.

  • 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-20T18:53:04+00:00Added an answer on May 20, 2026 at 6:53 pm

    Quick answer

    Setting the src attribute of the img tag to an empty string will interrupt the current download, even on Chrome.

    ###Details
    Nowadays most of browsers implemented that out-of-standard mechanism thought in the old answer to programmatically abort the connection. This is not achieved through a protocol request, but with a client-side in-memory operation. Keep in mind that is not a standard behaviour, but most of vendors courtesy. That is, it could not work on every browser.

    I’ve prepared a jsfiddle showing this mechanism in action (keep an eye at the network panel of the inspector).


    ### Old answer (2011)

    Your browser asks for that image with a specific HTTP GET request, as specified in HTTP protocol. Once it asks for it, the http server starts the transfer.

    So, it is between the browser (as http client) and the http server.

    Since http protocol does not take into account the option to abort a transfer, the browser should implement an out-of-standard mechanism to programmatically abort the connection. But since this is not specified in any standard, i think you won’t find any way to do that with javascript or any client side code.

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

Sidebar

Related Questions

I have a javascript file that I minify using the Yahoo YUI. When I
Just a quick question if someone has already that kind of setup or if
Suppose I have a Javascript array, like so: var test = ['b', 'c', 'd',
Suppose I'm entertaining a business model that offers free access to my propritary data
You can see the way its suppose to work by visiting: link text That
Not sure the best way to phrase the question, but suppose you are using
Suppose I have following html page. <html> <head> <link type=text/css rel=Stylesheet href=css/some.css /> </head>
Or concrete - I am using this javascript RSA library for the client side
Hello (Prevent website url in print from javascript?) I am sure some simple solution
I have Flash game at my site. There is a button Download full version

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.