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

151
Vistas
Emoji keyboard online for browser

I wrote an emoji keyboard online (maybe called it emoji picker, emoji selector) at https://www.emojionline.org. Everything works ok, but there is one problem for memory optimization. My data is stored in an json file. It has 2000 records (size 600kb). I use ajax to load it into memory:

function loadData(){
json = (function () {
json = null;
$.ajax({
    'async': false,
    'global': false,
    'url': 'data.json',
    'dataType': "json",
    'success': function (data) {
        json = data;
    }
});
return json;
})(); 

} And on ready event of document, I called it.

$(document).read(function(e){var data = loadData();});

Everything works well on PC, Mac and smartphone with high RAM (>=GB). For weaker devices, I feel it works bad. Sometime, if the connection is low, I got the message ".... the page need to be reloaded". I understand that to hold a big json file in memory is not good processing. But I need this data for processing. What can I do to do in this situation? I just use jquery, js, html, css. No dynamic languages for web, such as PHP, Java... in this situation are recommended.

I found the solution, but I don't know this is good or not. For me, it really reduce time loading. The solution is: embbed the data into html file. Use external files always make more requests and reduce performance.

over 4 years ago · Santiago Trujillo
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