antirez / antirez/dump1090

Fix browser caching

オープン
#106 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C
スター
2.9k
フォーク
1.4k
PR マージ指標
30日以内にマージされた PR はありません

説明

I see a potential caching issue whereby the browser may hang on to previously loaded json for a couple of minutes (depending on the browser). Easily fixed by referencing the .json file with an arbitrary value to negate the caching:

So, change:

```
function fetchData() {
$.getJSON('/data.json', function(data) {
var stillhere = {}
```

to:

```
function fetchData() {
var time = new Date().getTime();
$.getJSON('/data.json?' + time, function(data) {
var stillhere = {}
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。