Asset libary is loaded three times instead of only once

this page

https://skysails.info/marine_performance/news.html?artikel=IMO_DECISION_MONITOR_CO2

will load axios.js ZERO times in the Head

The page will load only one MOD =

and that mod will again load one nested Mod (this nested mod will request axois once mod = raammd )

nevertheless the page is loading axios.js THREE TIMES apparently

Further investigation :

If I uncomment the nested mod inside the html section of “anymod-ramblm”, axois will even be loaded FOUR times !?

In looking at your first example, it looks like axios is loaded twice. Once is with the legacy script that is no longer used in mods since last year. Unfortunately there is no way around that other than to rewrite the older mod to not have that dependency. None of the verified mods have this any more (since last September). We can take a look at your legacy mod if you want – it is usually a very straightforward switch, but we didn’t want to mess with mods that were in use.

For the second two times, it is the same file being redirected (302) and then downloaded. This happens because the URL is for the “latest” version, which redirects to the actual latest url.

In your second example, are you loading it into an iframe? If so the browser will need to download new dependencies. If on the same page, the browser will cache the same file no matter how many times it’s requested.

On further inspection, the legacy script is coming from 2 mods: rbada and ankol which were on the page previously. You can clear the page cache to remove the assets associated with these mods, and the legacy script should stop being loaded since it’s no longer in use.

Okay, thank you for the insight.

I will do so.

I will delete the “anymod-page-cache”

Okay I got rid of the outdated axios.js URL.

I was able to reduce the requests from 4 to only 1 request.

I just wanted to better understand. AND I wanted to make sure this was not some mistake havig a larger impact ; )

Thank you

1 Like