Hey. In order for the user to see the beautiful preloader download site, I use the following code:
var xhr = new XMLHttpRequest(); //path -- это переменная с адресом файла на сервере. Список path так же получаю с сервера. //задаю переменную path в xhr, для доступа из событий onload, error, ... xhr.path = path.toString(); xhr.open("GET", 'https://web.lotus-app.ru/' + path, true); xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xhr.responseType = "blob"; //задаю onload, progress, abort, errror, timeout xhr.send(); All files (js, svg, css, tff, html) from the site are loaded, but when they are needed by the browser, they are loaded again, i.e. This whole preload does not give anything. How to do it right?
Addition
Found that the files that the browser needs are of type: stylesheet, png, svg + xml, script, document; and those that I ship: xhr ...
