KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I show an animated GIF that runs while my AJAX request is in progress and gets stopped once my script has processed the response. While this works, I notice that while the response from the request is being processed in my script (which contains some fairly heavy updating of the DOM) the animation freezes. My research leads me to believe that this is because the animation of the GIF happens on the same thread that javascript is running on - that the browser is truly single-threaded. Is this the correct interpretation for all current mainstream browsers (e.g. Chrome, Firefox, Safari, IE)? Secondly, why is it done this way? Is it really not possible that the browser could dedicate a thread to GIF animations so they didn't freeze when a block of javascript was being executed? Update This is an interesting page. It talks about using pure CSS3 animations. They still freeze in Firefox though - maybe soon FF will fix this. Looks like I should be considering CSS for animation rather that using a GIF.
Tags (comma-separated)
Save Edits
Cancel