I'm writing a little app that allows you to search for gifs using GIPHY and displaying them as the user types their search input, but the more the user types the page becomes less responsive. I figured this was due to:
Now I went around 1) by introducing AbortController but I have no clue if and how should i deal with 2) The error that I get before the browser starts to crash is:
GET {link to gif} net::ERR_HTTP2_PROTOCOL_ERROR_200 (OK)
My question would be: Why does the browser crash? Are saved gifs in the browser a reason for that, and if so how do I go about solving this?
Yes, the amount of unused gifs caused the crash. The way around it was to include:
image.removeAttribute('src')
for every image removed from the page.