Why do you do this gif


Закрыть ... [X]

well, this is for many reasons. First at all, when the ajax call back of the server, you will sense a few miliseconds your gif frozen, but not many relevant. After you will start to process information, and depending of the objects that you manipulate and how you do it, you will have more o less time your gif frozen. This is because the thread is busy processing information. Example if you have 1000 objects and your do a order, and move information, and also you use jquery and append, insert, $.each commands, you will senses a gif frozen. Sometimes it's imposible avoid all the frozen gifs, but yu can limit the time to a few miliseconds doing this: Make a list of response ajax, and process it each 2 seconds (with this you will have the results in a alone array and you wil call it with one setInterval and you avoid the bottle neck of try process one response when the before response is still processing). if you use JQuery don't use $.each, use for. Don't use dom manipulation (append,insert,etc..), use html(). In resume do less code, refactor, and procdess all the response (if you did more of 1) like only 1. Sorry for my english.


Источник: https://stackoverflow.com/questions/191413/why-does-my-spinner-gif-stop-while-jquery-ajax-call-is-running


Поделись с друзьями



Рекомендуем посмотреть ещё:



Похожие новости


Ажурный узор спицами схемы и описание для кофт
Заяц коська раскраска
Раскраска из пластика
Девки сосут gif
Раскраски о пограничниках
Палантин узор паучки


Why do you do this gif
Why do you do this gif


Why Dont I Have GIF Stickers On
Can you hear this silent gif bouncing?



ШОКИРУЮЩИЕ НОВОСТИ


Похожие новости