I want to use javascript or jquery to detect when the day has changes (0:00) and submit an ajax call to the server.
At first I thought about creating an interval object to check, but it seems it will be inneficient since it will be checking every second for a date change...
Perhaps I could calculate between the difference from time.now and midnight, then schedule something that will load at that time. How can I schedule something to work that way in javascript/jquery? Or maybe is there a more reliable solution?