Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

81
Vistas
Properly caching firebase storage image

I have a chat web application that I am attempting to cache images downloaded from Firebase Storage. I have set the cacheControl metadata property to 64800 when uploading the picture.

let storageRef = ref(storage,'Groups/' + this.groupRef.id + '/Images/' + uuid())
    const metadata = {
        cacheControl: 'public,max-age=64800'
    }
    uploadBytes(storageRef, context.image, metadata).then(async (snap) => {
        // Do something
    })

However, when I reload the page, the app redownloads the picture from Firebase. I have confirmed that the metadata property is set on every image (see below). This is obviously not ideal, considering if users switch between groups, it will attempt to redownload the images and will get very pricey, very quickly. Why is it redownloading each time? Here is the code to display the image

<v-img height="200" :src="msg.uri" @load="loaded" @click="launchImg(msg)"/>

cacheControl metadata

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

After doing more testing, it appears v-img does not handle cached images for whatever reason. After switching to an <img> tag, the caching appears to be working properly now

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda