antirez / antirez/dump1090

Fix browser caching

Abierto
#106 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C
Estrellas
2.9k
Forks
1.4k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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 = {}
```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.