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

132
Vistas
storing 3-4mb of data in frontend/angular app

I need to store about 3-4mb of data (USPS address data mapping zip code to county across the entire US) in the frontend code for fast retrieval. The primary use case is that my users will type in their zip code and I need to tell them what counties they are in.

Storing the data in a plain JSON file in the frontend repo seems like a bad idea because it blows up my app size.

I don't want to retrieve it via an API because the input field performs logic that requires the address data on 500-1000ms delayed keystroke.

My main approach now is to load all the data via API when the app is loaded, and store it into IndexedDB if it doesn't exist already. The annoying part here is it's not obviously "instant" to call an API that returns 3mb of data. An optimization here is that I could just return the data for the county or state that I think the user might be in based on getCurrentPosition() first (unless not allowed), with a follow up async call to return the rest.

Are there any other strategies that I might be missing?

about 4 years ago · Juan Pablo Isaza
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