Question

I am currently working on a project built on top of Ember.js, and I am compiling everything with CodeKit (keeps all different controllers, models, views etc. in a nice folder structure which is compiled on save into one single file, gotta love it.).

However, when CodeKit refreshes the preview server, it adds an URL parameter called ckcachecontrol. I believe this is called the cachebuster. The downside of this is that EmberJS is not happy with that parameter and throws a bucketload of errors resulting in an exception like this:

Error while loading route: Error: No model was found for 'list'
at new Error (native)
at Error.Ember.Error (http://ihoutman.local:5757/js/libs/ember-1.5.0.js:910:19)
at Ember.Object.extend.modelFor (http://ihoutman.local:5757/js/libs/ember-data.js:9894:33)
at Ember.Object.extend.findById (http://ihoutman.local:5757/js/libs/ember-data.js:9183:21)
at Ember.Object.extend.find (http://ihoutman.local:5757/js/libs/ember-data.js:9170:21)
at Ember.Route.Ember.Object.extend.findModel (http://ihoutman.local:5757/js/libs/ember-1.5.0.js:36568:23)
at Ember.Route.Ember.Object.extend.model (http://ihoutman.local:5757/js/libs/ember-1.5.0.js:36546:17)
at Ember.Route.Ember.Object.extend.deserialize (http://ihoutman.local:5757/js/libs/ember-1.5.0.js:36556:19)
at http://ihoutman.local:5757/js/libs/ember-1.5.0.js:32971:57
at http://ihoutman.local:5757/js/libs/ember-1.5.0.js:33463:19 ember-1.5.0.js:3521

Root of the problem here is that it slows my development down to remove it each time after a refresh and the question is: how do I prevent Codekit from putting that url parameter there?

The website does not seem to pay any attention to it, but I firmly believe that it could be disabled somewhere, right?

Does someone know if that is possible?

thanks!

Était-ce utile?

La solution

I could not find specifically how to disable the cache buster, but I know it is possible since the release notes make reference to that ability:

FIXED: The cache buster is now much smarter and will handle URLs with query strings and anchor tags correctly. There is also now an option to disable the cache-buster completely.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top