Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6813443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:34:15+00:00 2026-05-26T20:34:15+00:00

I am developing an autocomplete jquery plugin and I would like to optimise it

  • 0

I am developing an autocomplete jquery plugin and I would like to optimise it for speed as much as possible, currently in my json data each piece of data has an image attached to it.

The image is retrieved from a website and therefore is stored as “www.website.com/images/image.png” for every piece of data. Since each piece of data is being retrieved from the same folder in the website (www.website.com/images/) I would like to simply have to type in the image name and my css would add the “www.website.com/images/” at the start.

To conclude:

In the json text the element:” image: ‘http://www.website.com/images/square.png’ “

Needs to be reduced down to ” image: square”

I hope that I am making any sense to you at all, this is very hard to explain.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:34:15+00:00Added an answer on May 26, 2026 at 8:34 pm

    I personally would send a format string in the JSON and then have your processor use that:

    var json = {
        imageFormat: "http://www.website.com/images/{value}.png",
        data: [
            {text: 'foobar', image: 'square'},
            {text: 'second', image: 'triangle'}
        ]
    }
    
    for(var i = 0; i < json.data.length; i ++) {
        var image = json.imageFormat.replace("{value}", json.data[i].image);
        var text = json.data[i].text;
        // Do your own stuff.
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing an app using Rails and jQuery. I would like to submit
I'm developing a form, and using jQuery UI Autocomplete. When the user selects an
developing for Android phone(ver 1.5) I would like to know if there is an
I am currently developing a web-frontend for a web service. I am using jQuery
I am developing an app which requires JSON. I use the link https://maps.googleapis.com/maps/api/place/autocomplete/json?input=+place+&types=geocode&sensor=true&key=AIzaSyCA4LKD6QfiCrGhZjCsYiRyEGqxKOUEQBU ,
Im currently developing an webapplication that are going to have an Autocomplete search form,
Developing a Sencha Touch MVC app that pulls data from json store (thats set
Now, I'm developing a command-line application somewhat like bash. For implementing the autocomplete functionality,
I'm developing a custom autocomplete control in pure WinApi, and the problem that I've
Developing websites are time-consuming. To improve productivity, I would code a prototype to show

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.