https://github.com/grails-plugins/grails-resources/pull/11
According to the owner of the resource plugin, Mark Palmer, they ignore checking old links to static resources.
Thus, this manifests itself as a load balancing problem that you would have in any system if you are not using sticky load balancing (which is the case with Heroku). Here's what happens in the Geroku case:
- The request comes at someapp.com
- index.gsp is served from application server 1, web.1 index.gsp contains
- The resource plugin generates a mapping from /static/js/resource.js to / js / resource.js on the website.
- The client makes a request for /static/js/resource.js
- The request is sent to another application server, web.2
- /static/js/resource.js does not appear on .2 and 404s websites
From my research, it's best to declare your resources in a resource file.
See the following:
http://grails-plugins.github.com/grails-resources/guide/3.%20Declaring%20resources.html
This will tell the application server at boot time that the resource exists ahead, avoiding the adhoc boot process.
For example, as in my previous letter, MyResources.groovy will look like this:
modules = { application { resource url:'js/application.js' resource url:'js/ui.geo_autocomplete.js' } }
So, you can use either of the two methods - explicitly specify resources or use adhoc download (add the following to your Config.groovy :)
grails.resources.adhoc.includes = [] grails.resources.adhoc.excludes = ["*"]
It essentially disables adhoc resource processing.
Maxim source share