Express migration + website caching

I am recommending this code be merged with the main branch immediately. We have discussed it a lot on the dev group. I just tested a javascript alert in client.js, which was immediately displayed on the first reload (reload button only, no shift required). I also changed the text and the change was again displayed on the first reload.

This tells me the new caching mechanism is recognizing when the files have changed. I believe this proves our code changes will be recognized immediately.
If you wouldn't mind deleting it, I can send you patch if you want.

I'm pretty happy with this, it's soft caching which does not prevent
updates.
While more caching could be done, I think simply removing all the `load`s
alone will accomplish quite a bit.  Having added the soft caching like we
have will also continue to help.

This particular caching should not require any cache busting (except to fix
the overly aggressive cache now)  once everyone is using this, we can
iterate on smarter or stronger or softer caching.

If Adrien agrees, let's roll with this soon.

-bewest


On Tue, Jul 1, 2014 at 12:40 PM, Brian Hanifin <notifications@github.com>
wrote:

> In static/js/client.js:
>
> >
> >      $('#testAlarms').click(function(event) {
> > +        d3.select('.audio.alarms audio').each(function (data, i) {
> > +          var audio = this;
> > +          audio.load();
>
> Looking for confirmation I found this statement in HTML5 Audio - The
> State of Play <http://html5doctor.com/html5-audio-the-state-of-play/>:
>
> Until fairly recently, the load method was required in order to tell the
> browser about a change in the media source and to get it to update
> appropriately. Now, *media.load() causes the element to reset and to
> start selecting and loading a new media resource from scratch.*
>
> So I agree that this is probably unnecessary. Are you asking *me* to
> remark it out or delete it?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nightscout/cgm-remote-monitor/pull/26/files#r14425040>
> .
>