I write random bits of scripts for internal use, I'm happy enough to drop the min.js in with my index.js, index.css and index.php files, especially if it means I can continue to use
getJSON('/my/url', function(data) {
});
Rather than
var request = new XMLHttpRequest();
request.open('GET', '/my/url', true);
request.onload = function() {
if (this.status >= 200 && this.status < 400) {
// Success!
var data = JSON.parse(this.response);
} else {
// We reached our target server, but it returned an error
}
};
request.onerror = function() {
// There was a connection error of some sort
};
request.send();
The 90KB of jquery is nothing compared with the amount of crap modern javascript frameworks put in on other sites.
I've just looked at one page I wrote which has a little jquery in it. The outputted data is 673kb, which takes nearly half a second to generate and load. The jquery file being static is down in 0.01s.
Maybe that's just me but I find the async/await stuff way harder to understand than a simple callback. Sure when you're going through callback hell you're glad to have promises and the syntaxic sugar, but for simple things the callback makes sense, especially since it's already how you use map and filter in JS.
I write random bits of scripts for internal use, I'm happy enough to drop the min.js in with my index.js, index.css and index.php files, especially if it means I can continue to use
Rather than The 90KB of jquery is nothing compared with the amount of crap modern javascript frameworks put in on other sites.I've just looked at one page I wrote which has a little jquery in it. The outputted data is 673kb, which takes nearly half a second to generate and load. The jquery file being static is down in 0.01s.
This isn't a problem