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

98
Views
Speed up page loading with below scripts (dual language page)

I have the following scripts for dual language page (this is an overhaul of initial single-language webpage). What I am trying to achieve here if to change the words in HTML instead of using bulk edit function in Shopify or any other apps. However, if there are 1000s of them the webpage loading will be impeded seriously. Anyway to optimise it?

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" type="text/javascript"></script>

<script>

if ( window.location.href.indexOf(".com/zh") == -1) {
  
  String.prototype.replaceAll = function(search, replacement) {
    var target = this;
    return target.replace(new RegExp(search, 'g'), replacement);
  };  
  
  
   $("div").html(function() { return $(this).html().replaceAll("steady", "安定");  }); 
   $("div").html(function() { return $(this).html().replaceAll("doctor", "医者");  }); 

  ;    
  
}

</script>

Thanks.

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