I have a long string (it's a base64 data) with 2 000 000 characters.
I need to send this string with ajax to a php script, but the execution time is very long.
After test, if i reduce the number of character, my ajax request is speeder.
So, how can i reduce, compress or don't know... my string with javascript, and decompress this string with php ?
I have test lz-string, but it's the same, the result is a big array and it's not really speeder.
Do you have any solutions for me ? Maybe replace the longer substring, wich is repeat x times by "$", and inverse replace with php ? thanks !
Edit : my ajax call
$.ajax({
type:"POST",
url: "/webcam/",
data: {image_gif:gif},
success: function () {
parent.$.fancybox.close();
}
});
gif is a string with 2 000 000 of characters, or an array of chunk with 500 000 characters each.