I'm running several free, single-dyno apps on Heroku that go to "sleep" when idle for some time. I have a master site that is always awake and links/utilises these other apps that sometimes go to sleep. When I link to the sleeping apps from the main site there is that long loading wait whilst the other app wakes up.
What I want to do is wake all of the potentially sleeping apps the moment a user lands on the main page, sort of like pre-loading them, so it's quick to respond when the user needs it.
I am currently using a simple $.get(...)
in the background but of course the console throws the 'Access-Control-Allow-Origin' error. I don't need any data or anything, just some sort of response to indicate the app is up and running. Anyone know how I can do this with an AJAX call without errors?
(Or if there's any other way, like through the API or something)