Both user voice and google analytics give some small javascript code which internally loads another BIGGER js file from their server during page load. I am looking to reduce the HTTP requests. Can I download these files and let RAils assets precompile merge them into one? Or you think this will cause issues?
Both user voice and google analytics give some small javascript code which internally loads
Share
You can’t do it. Both Uservoice and Analytics need to do AJAX requests to the corresponding site.
According to the AJAX cross-domain request policy, they have to be on the same domain as the page they’re calling. If you’d pack them into your javascript they would break.