Jump to content

JavaScript Loader: I finally found a tiny crack in the armor


Steven Koontz

Recommended Posts

Alejandro and Kristian,

 

I think your work on the JavaScript loader has gone mostly unnoticed and I want to thank you for what you have done to get a whole bunch of JS files out of the header. I use it on multiple sites and it works great. But I have found a situation that breaks it. Actually, only one function breaks.

 

If either, or both, Joomla caches are enabled (Page Cache Plugin or Global Config Cache or both) there is a problem with the geomaps JS. About 50% of the time when either or both caches are enabled, the proximity search address autocomplete does not load. The maps load fine, it just seems that the Advanced Search Module's autocomplete does not load correctly. Any search done when it does not load (i.e. the "Type to see suggestions" does not load in the form) will show no results at all.

 

So, if you have time and the space here in the forum (i.e. if what I'm about to ask is not too much of a bother), I would be willing to test a setup that excludes geomaps-ck.js from the JavaScript Loader and instead loads geomaps-ck.js in the <head>.

 

If you could tell me what I need to modify to exclude geomaps from the JS Loader I will test it. If it's too much bother, that's no problem. We can wait until you have time, or even not try at all if you feel it's too much work / too little benefit. It's just that the new Google PageSpeed insights has gotten a lot tougher on server response time as well as JS loaded in the <head> and it has gotten me looking for ways to reduce the JS and CSS loaded at the top of the page.

Link to comment
  • 9 months later...
×
×
  • Create New...