Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

146
Views
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.

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!