Closed garyv closed 13 years ago
I'm pretty sure this is a duplicate of https://github.com/balupton/history.js/issues/46
Thanks Jason, not sure how I missed that other ticket.
I re-minified the files using Google Closure Compressor and YUI Compressor, and each one let me combine the files without causing a glitch.
My question now is, what compressor was used on the minified files in this repo, and why not switch it to YUI or Closure? But I suppose I should just create a pull request for that.
UglifyJS is used to do the minification. There's a feature request ticket to not omit the trailing semicolons, but it hasn't been actioned as yet.
Fixed in v1.7.1. We now also include bundled files in the distro :) Thanks guys.
Still not working in 2017...
On websites that combine multiple JavaScript files into one, history.js crashes with "undefined method" errors.
I consider this a bug because:
Details:
Quick and dirty fix:
Add a millisecond delay to each script file after the first one.
This is clearly too hacky to be a permanent fix, but it illustrates the problem well: History.js is dependent on the delay normally caused by loading each script with a separate HTTP request.