browserstate / ajaxify

Ajaxify your entire website instantly with this simple drop-in script using the HTML5 History API with History.js and jQuery ScrollTo.
602 stars 94 forks source link

Use gh-pages branch and server js with correct mime-type #3

Open TuckerWhitehouse opened 11 years ago

TuckerWhitehouse commented 11 years ago

When serving a javascript file from the github.com raw url such as http://raw.github.com/browserstate/ajaxify/master/ajaxify-html5.js, it gets sent as a plain text mime-type, which cannot be used as a script in internet explorer (or at least causes issues), so it may be beneficial to some users to keep a mirror of this project on both the master branch, and gh-pages branch, and then the script could be loaded from here http://browserstate.github.com/ajaxify/ajaxify-html5.js with the correct mime-type.

rdebeasi commented 11 years ago

It would be great if the files were served from a CDN such as CloudFlare instead of from GitHub. GitHub is not a CDN, and so it doesn't serve files with the HTTP headers that you'd want for good performance. In particular, a CDN would serve files with a far-future expires header. This StackOverflow thread has more info if you're interested.

Thanks for maintaining this awesome library! :)

rdebeasi commented 11 years ago

cdnJS might be a good place to host this library: https://github.com/cdnjs/cdnjs

TuckerWhitehouse commented 11 years ago

I actually use GitHub pages to host stuff, and then run CloudFlare on top of that but I agree that cdnjs would be a good choice.