better error reporting in timer callback; .htaccess for redir.html cache

This commit is contained in:
Steven Hugg 2018-08-25 21:03:29 -04:00
parent 6063b6598b
commit 0ade973ad7
5 changed files with 17 additions and 18 deletions

9
.htaccess Normal file
View File

@ -0,0 +1,9 @@
<FilesMatch "redir\.(html|htm)$">
FileETag None
<ifModule mod_headers.c>
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</ifModule>
</FilesMatch>

View File

@ -4,15 +4,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>8bitworkshop</title>
<!-- Bootstrap -->
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>

View File

@ -4,6 +4,6 @@
grep "var VERSION" redir.html
mkdir -p .tmp
cp demo.html .tmp/index.html
rsync -rpilv --chmod=a+rx -e "ssh -p 2222" .tmp/index.html redir.html privacy.html css bootstrap images $RSYNC_PATH/
rsync -rpilv --chmod=a+rx -e "ssh -p 2222" .tmp/index.html .htaccess redir.html privacy.html css bootstrap images $RSYNC_PATH/
rm -fr .tmp
echo "Done."

View File

@ -196,25 +196,20 @@ export var AnimationTimer = function(frequencyHz:number, callback:() => void) {
} else {
lastts = ts + intervalMsec; // frames skipped, catch up
}
if (running) {
scheduleFrame(lastts - ts);
} else {
pulsing = false;
}
if (!useReqAnimFrame || lastts - ts > intervalMsec/2) {
if (running) {
try {
callback();
} catch (e) {
running = false;
throw e;
}
callback();
}
if (nframes == 0) startts = ts;
if (nframes++ == 300) {
console.log("Avg framerate: " + nframes*1000/(ts-startts) + " fps");
}
}
if (running) {
scheduleFrame(lastts - ts);
} else {
pulsing = false;
}
}
this.isRunning = function() {
return running;

View File

@ -951,6 +951,7 @@ function installErrorHandler() {
'exFatal': true
});
alert(msgevent+"");
_pause();
};
}
}