Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safari requesting url undefined during image cleanup #597

Open
lewismoten opened this issue May 20, 2024 · 0 comments
Open

Safari requesting url undefined during image cleanup #597

lewismoten opened this issue May 20, 2024 · 0 comments

Comments

@lewismoten
Copy link

Hello. I noticed that my server was getting hit with tons of requests for /undefined. Although the response was only 238 bytes, the great number of the requests per second (less than 60) was adding up. I tracked the problem down to BrowserCodeReader.ts on line 1161 during image cleanup in the _destroyImageElement function. Before removing the image src attribute, it is assigned the value of undefined. In the Safari web browser on macOS, this results in a request as if undefined is an expected resource. I do not see this behavior in Google Chrome.

Environment Name Version
Operating System Apple macOS Sonoma 14.2.1
Browser Apple Safari 17.2.1 (19617.1.17.11.12)
Browser Google Chrome 124.0.6367.203 (Official Build) (arm64)

// then forget about that element 😢
this.imageElement.src = undefined;
this.imageElement.removeAttribute('src');
this.imageElement = undefined;

@lewismoten lewismoten changed the title Assigning undefined to image.src in Safari Safari requesting url undefined during image cleanup May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant