-
Notifications
You must be signed in to change notification settings - Fork 72.8k
Gzip / Caching Improvements #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
importing lastest nightscout master code
Trying some experiments to see if I can serve alarm.mp3.gz files instead of the uncompressed originals.
The .mp3 files will not be sent compressed without this.
changed gzip:'true’… According to the node-static read me this
shouldn’t work, but it works to compress all files.
/audio/alarm.mp3 drops from 587,716 bytes to 4,822!
TEST OUTPUT
macbookpro:audio dev$ curl http://localhost:1337/audio/alarm.mp3
--silent --write-out "%{size_download}\n" --output /dev/null
587716
curl --compress http://localhost:1337/audio/alarm.mp3 --silent
--write-out "%{size_download}\n" --output /dev/null
4822
Added additional instructions to get my.env working.
Used appcache-node to generate a nightscout.appcache file which includes directives on which files to cache.
(socket.io and bower)
|
👍 fantastic, thank you! |
|
You might want to change your mongo db password, if you have not already. This should help stay under Azure's free quotas. |
|
Nice. @bewest should we create the following for nightscout specific: |
|
Yes. These look good. On Fri, Jun 20, 2014 at 6:56 PM, rnpenguin [email protected] wrote:
|
|
Agree. Should we set it up for nightscout specifically though |
|
I turned on travis just now. |
|
https://david-dm.org/nightscout/cgm-remote-monitor - I'm not crazy about this one, we pinned down socket.io on purpose. It'd be pretty cool if instead, they measured whether or not the dependency chain is precise and can be resolved rather than how old they are. |
|
:). That would be better, I need to look into it a bit more. |
|
Oh, and I changed the password. Thanks for the reminder. |
|
Guys, I think I tried to pull in the wrong direction. Please ignore/cancel that request. I'll have to do this when I'm paying better attention. |
|
I think I hit my limit because of an alarm running on an open window on the computer while we were out today. Can I get some help in adding this caching behavior to mine? Thanks! |
|
This version of the code didn't quite have the effect we were hoping for. I have a new branch that is about ready, and caches the mp3 files really well. You can merge this into your copy. Go to the link below, and create a pull request to your master branch (make sure your branch is on the left, and mine is on the right). https://github.com/brianhanifin/cgm-remote-monitor/express-cache |
|
How do I create a pull request? Also when I clicked on the link I get a 404 error. I just did my setup yesterday so this will be my first update of any kind and I don't really know how to do it. Thanks! |
…mol-l Adds support for mmol/L units. fixes nightscout#16
Navid 2022 10 26
feat(ai-eval): Add 14-day limit to AI evaluation report







First, I modified
nodeStatic.Server(".")to include a 30 day cache and enabled gzip compression. It may only make a small difference with the .mp3 files, but the js and css files are much smaller when gzipped. I added gzipped versions of the MP3 files (e.g.alert.mp3.gz).Next, using appcache-node I implemented an "offline" HTML 5 Application Cache. Below is the generated nightscout.appcache file. The "NETWORK:" group defines the files that should never be cached offline. By specifying an asterisk we are saying that no other file should be cached (socket.io won't work if cached for example).
nightscout.appcache
I believe this is proof that the .mp3 files are being cached (showing a 304 Not Modified status). This as screenshot of Live HTTP Headers:
This is my first big stab at contributing. What do you think? I have it working both locally and on a test Azure server.