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.
I personally would send a format string in the JSON and then have your processor use that: