Skip to main content
Jdsplicer
Inspiring
July 10, 2019
Answered

ext-all.js file so large in CF2018

  • July 10, 2019
  • 1 reply
  • 1373 views

Why is the ext-all.js file (cf_scripts/scripts/ajax/ext/ext-all.js) over 10MB in size? We went from CF10 to CF2018 and have 40+ legacy apps that use the cfwindow and some other CF UI built-in functions from CF10 and the app calls the ext-all.js file wihen the site loads (needed for cfwindow) and takes almost 2 minutes. Yes, I know they need replaced but with two developers and 40+ medium to larger applications it's not possible to replace these cfwindows with jquery or bootstrap modal windows quickly, especially when you still have other projects going on. Does anyone have any ideas or options to reduce the file size or any other workarounds (besides removing cfwindows) to speed the load time. Thanks.

This topic has been closed for replies.
Correct answer James Moberg

There's no real way to do this. The last time I checked in CF9/10, these resource files are blindly included immediately below the first HEAD tag using a post-CFML CFHeader-type approach.  Our optimization tools stated <meta charset="utf-8"> should come before other things and any use of a CFUI tag prevented this from happening.

For a simple CFForm with a single "required" CFInput field, two (2) unminified JS files from 2012 totalling about 15k are loaded. (The validation method result in an unstylable, old-school "Alert" dialog.)  In cases like this, it's best to use HTML5 w/the "required" attribute and eliminate the use of CFForm altogether.

We once added IIS rules to rewrite certain file requests to a slightly modified versions of the files when we wanted to overcome a CFFORM issue.  (We also added long expire headers.)

As an example of some modern, responsive CFUI replacements, we use Tippyjs, MagnificPopUp, Select2, SweetAlert2, DateRangePicker, TimePicker and jQuery Validation.  Many of these libraries are easier to integrate than performing the configuration required for CFUI tags. Alternatives are definitely more customizable, updated more frequently and more accessible.

A repository titled "ColdFusion UI the Right Way" offers some other alternatives:
GitHub - cfjedimaster/ColdFusion-UI-the-Right-Way: A list of articles demonstrating how to do UI with ColdFusion on the …

1 reply

James Moberg
James MobergCorrect answer
Inspiring
July 10, 2019

There's no real way to do this. The last time I checked in CF9/10, these resource files are blindly included immediately below the first HEAD tag using a post-CFML CFHeader-type approach.  Our optimization tools stated <meta charset="utf-8"> should come before other things and any use of a CFUI tag prevented this from happening.

For a simple CFForm with a single "required" CFInput field, two (2) unminified JS files from 2012 totalling about 15k are loaded. (The validation method result in an unstylable, old-school "Alert" dialog.)  In cases like this, it's best to use HTML5 w/the "required" attribute and eliminate the use of CFForm altogether.

We once added IIS rules to rewrite certain file requests to a slightly modified versions of the files when we wanted to overcome a CFFORM issue.  (We also added long expire headers.)

As an example of some modern, responsive CFUI replacements, we use Tippyjs, MagnificPopUp, Select2, SweetAlert2, DateRangePicker, TimePicker and jQuery Validation.  Many of these libraries are easier to integrate than performing the configuration required for CFUI tags. Alternatives are definitely more customizable, updated more frequently and more accessible.

A repository titled "ColdFusion UI the Right Way" offers some other alternatives:
GitHub - cfjedimaster/ColdFusion-UI-the-Right-Way: A list of articles demonstrating how to do UI with ColdFusion on the …

Jdsplicer
JdsplicerAuthor
Inspiring
July 11, 2019

Thanks for the info Jamo and it's mostly what I thought. We have started to rip out and replace some of the old CF UI functionality. It will be a lot of late nights but in the long run it will be better.

Community Expert
July 14, 2019

Jamo's answer is the right answer for sure. In the meantime, have you tried minifying the ext-all.js file if it's not already minified? That should buy you some time.

Dave Watts, Eidolon LLC

Dave Watts, Eidolon LLC