Minifying external .js - potential product idea

coldpotato

Newbie
Joined
Aug 25, 2017
Messages
2
Reaction score
0
Just looking at some of the performance stats for various websites I manage and one of the reocurring themes is that of external js causing massive performance issues.

This lead me to consider whether it would be feasible to create a website called 'extjs.com' for example, whereby you could:

1) input all the links to your external .js files eg fontawesome etc
2) compile & minify them into a single .js and host it there at extjs.com/mysinglejsfile.js
3) include only this external js file in the theme of each webpage

This could be further improved by having the ability to automatically check for newer versions of scripts and compile and minify on a regular basis with some history/versioning options in case things don't go to plan.

Does this already exist somewhere in the world or would there be limitations to this idea?
I'm no developer by the way, but have dabbled with wordpress, silverstripe and magento and have some basic understanding of dev stuff.
 
That's actually a pretty good idea. There are build tools developers can use to concat and minify all of your files, typically CSS and JS files. I like to put all 3rd party files into a vendor.js file and my code into a script.js file since my JavaScript is specific to my site and is likely to change more often.

You could have your extjs.com (btw ExtJs is currently a JS framework) give you the options to select what 3rd party JS vendors you want, then build you a custom file hosted on a CDN for you to use. I don't think I would want the versions to automatically update because things on your site will eventually break or be incompatible.
 
good idea,,,now imagine hundreds of websites with thousands of pages calling the file simultaneously :)
 
good idea,,,now imagine hundreds of websites with thousands of pages calling the file simultaneously :)

It's essentially of DOS attack but that's what CDN's are for. To host your static files and set a long cache expiry time so the browsers/users who already requested the file on some other site will have it in their browser's cache and won't initiate the request and instead load it from the cache.
 
Back
Top