https://github.com/integralist/xhrl
AJAX based Script Loader
https://github.com/integralist/xhrl
Last synced: 4 months ago
JSON representation
AJAX based Script Loader
- Host: GitHub
- URL: https://github.com/integralist/xhrl
- Owner: Integralist
- Created: 2011-03-06T20:01:49.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2012-07-01T14:27:25.000Z (almost 14 years ago)
- Last Synced: 2024-12-31T13:43:17.984Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 1.26 MB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
XHRl
====
Description
-----------
AJAX based Script Loader (Uses basic Promises implementation).
Reasons for building 'yet another' dynamic script loader:
* I wanted to learn how to write one myself
* I wanted a script loader that actually informed the developer of errors! (aka jQuery which cryptically hides errors)
* I wanted to avoid typical browser sniffs used to keep execution order (e.g. LABjs)
* I wanted to avoid using hacks ([such as...](http://www.phpied.com/preload-then-execute/)) - used in a few script loaders.
Disclaimer
----------
I wrote this script not to compete with any of the existing script loaders, but to learn something new by the virtue of trying to build one for myself.
Limitations
-----------
One limitation of this script loader is that because it relies on `XMLHttpRequest` all scripts loaded must be hosted on your own domain (i.e. you can't call jQuery from the Google CDN). Now for my use cases this isn't a problem, but for some people this may be a big deal. Take it or leave it.
Other Script Loaders
--------------------
Here's a list of other script loaders I've looked at...
* [LABjs](https://github.com/getify/LABjs)
* [YepNope.js](https://github.com/SlexAxton/yepnope.js)
* [RequireJs](https://github.com/jrburke/requirejs)
* [HeadJs](https://github.com/headjs/headjs)
* [ControlJs](http://stevesouders.com/controljs/)
* [Steal](https://github.com/jupiterjs/steal) (part of JMVC library)
* [loadrunner](https://github.com/danwrong/loadrunner/)