JS file twice loaded
-
Hi,
I’ve got a leaflet.js file (for openstreet map) called 2 times, by 2 different plugin (shipping plugins on checkout page).
I’ve made the 2 plugins call strictly the same leaflet.js file at unpkg.com
Then I set the localization so that these files are loaded from my host.
Everything works as expected:
A first 302 request, then a second request to the Litespeed-optimized JS file.My questions:
Since the 2 LS-optimized files are identical (same name), why isn’t the first one loaded in the browser cache to prevent the second one from being loaded from my host?
Is it normal for the first 302 request to take so long (around 1s)?
Because in the end, I have 2 one-second requests (the “302s”), then 2 requests to the optimized file (approx. 40ms), i.e. a total of 2080ms (approx.).
If I don’t localize, I have 2 requests of about 300ms, for a total of 600ms.
This is counter-productive for me…Thanks for any advice.
Best regards
- You must be logged in to reply to this topic.