Answer the question
In order to leave comments, you need to log in
How to cut off the process of waiting for sending a request for an image or a script?
There is a mobile version of the site, there are counters, there are pictures from third-party services. The question is, how to cut off the request process in JS? Here is the same waiting .
The point is to chop off non-critical things if they don't give up for too long.
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
To chop off the request, simply remove the image from the DOM.
With jQuery:
You also need to know if it loaded, jQuery has $.load() for that.
This can also be done in native JS, it’s easy to google, I don’t remember from memory.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question