Lessons

Blocking files

If a file from a blocked site is connected to the page, it will be loaded for a very long time until the browser resets the connection by timeout. The timeout occurs after 30-45 seconds. All this time, the page will be waiting for the file to load. This will delay calling the windows.onload key event. Part of the functionality of the site is activated by this event.

The easiest way to determine the download block is to look at the browser tab. If the page is fully displayed, but the browser tab shows the loading animation instead of the favicon of the site image, then there is a blocking script on your site.

Therefore, you need to make sure that the site does not use files from blocked sites, or at least make sure that they load asynchronously and do not block page loading. To upload files asynchronously, use the following function:

window.addEventListener("load", (event) => {
    setTimeout(function() {
// Here is the code for uploading files
    }, 50);
});
``
or jQuery version
```language-javascript
$(window).on("load", function(event) {
    setTimeout(function() {
// Here is the code for uploading files
    }, 50);
})

Tariff plans for working with the service

We use cookies. By continuing to use the site, you agree to the processing of personal data in accordance with privacy policy. I agree