Why am I getting hundreds of requests for *js files in /frontend_latest/ when I login remotely?

I noticed if I login from a browser outside my network, as soon as the login page is presented there are hundreds of requests for .js files that are happening the background (see screenshot of chrome dev tools).

They are not errors, the requests are getting a 200 response.
When I log in locally at home, I do not see these.

But what are these for and why only remotely?

Sure it’s not some browser addon? What is the target of those calls?

Hi- The target is Home Assistant (these are all *.js files in the frontend_latest directory). For example:

http://[ha ip]:8123/frontend_latest/xxxxx.js

I have the exact same issue/question on this. I’m using Cloudflare for DNS, I don’t understand why several hundred .js files are loaded before login.

I tested this again, just using the external IP/FQDN of my home router to make it look like I was using the external URL.
Same thing, 541 FILES loaded (mostly .js files) even before logging in! This is crazy, can anybody else verify this using the dev tools in your browser and logging in with your external URL?

Is this a bug?

I exclusively use External IP; what’s upsetting is if I log in before every javascript is loaded (it takes around 30-35 seconds) it’ll kick me back out and force me to log in again. I can’t believe this isn’t affecting more people.

I’m running an ESXI 6.7 Ubuntu VM with a docker Home Assistant instance (no supervisor); I’m using Z-WaveJS2MQTT, VSCode, ESPHome, & Prometheus. With a separate Kubernetes cluster that has NGINX as my ingress to my backend server stuff.

None of that makes a difference even when only Docker & Home Assistant are the sole resources. I really hope this thread gets more traction.

I observed a very similar thing using my HA 2022.11.5 installation which is run via Docker, and proxied through two nginx servers to an accessible domain name.
The behaviour with my installations differs a bit from the reports here:

  • I don’t have to wait for the requests to finish, I can always log in
  • the requests also occur when I’m logged in

The requests appear to be roughly in alphabetical order and I can only reproduce this in Chrome (tested version 108). In Firefox version 107 the request spam does not occur for me.

I have the same issue the first time i access the page. The error occurs whether i’m logged in or not.
I can log in and all works correctly.
After approx. 550 requests the page reloads and i need to log back in if i haven’t checked the box keep me logged in.
If i’m waiting on the login screen the the same happens (the page reloads after approx. 550 requests).
After the reload all works just fine.

Same behaviour here, what is happening? This is not that great…

Same thing happening here, 500+ requests, then it reloads itself and doesn’t happen again (until a cache clear or accessing it on incognito)

Bump :slight_smile:
It’s still there. Even in the 2024.3 version.

Anyone ever find an answer to this? I’m seeing it now

Looks like it’s just reloading the Javascript files to make your front end work. If you haven’t ever logged in with that client I’d expect it Tbh.

Why are there so many though… It’s like hundreds. Is it not more efficient to use one larger request?

Is there a problem? The front end loads pretty quickly lately.

1 Like

That’s how web browsers work the browser is given a list. It fetches. That’s it.

You’re seeing the log of what was fetched.

This is totally expected, and nothing to see here.

I wanted to do rate limiting in my reverse proxy but due to this unfortunate behavior I can’t.

Why is it given a list then.

Interestingly it seems like the number of files it is loading is NOT the same. … it seems like it is loading more files when doing it remotely? I am trying to keep the cache clear to test it.

The ‘list’ is the entire list of Java elements loaded in the HA front end.

When your browser logs in it gets the HTML definition of the site. It reads all the structure and starts loading the resources listed.

(and here is your big misunderstanding)

Your browser looks in its cache to see what’s already loaded and still ‘fresh’ according to certain rules. (do I already have a copy of this?)

Then the browser starts pulling all the files it DOESN’T ALREADY HAVE.

That may be all of them (big giant list) or maybe only a few because you were there yesterday and already loaded everything except the new - whatever - you installed yesterday.

Seriously this is normal operation and trying to change it WILL BREAK STUFF.

Nothing to see here.

3 Likes