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
Core: AJAX update of resource doesn't check for duplicate CSS/JS #11714
Labels
⚡ performance
Performance related issue or enhancement
Comments
melloware
added
🐞 defect
Bug...Something isn't working
‼️ needs-triage
Issue needs triaging
⚡ performance
Performance related issue or enhancement
and removed
🐞 defect
Bug...Something isn't working
‼️ needs-triage
Issue needs triaging
labels
Apr 2, 2024
I am still investigating this but I think it might be this Mojarra bug long since fixed that caused it to keep adding resources to the page that have already been added |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
@tandraschko this was originally reported on a forum post in 2022: https://forum.primefaces.org/viewtopic.php?t=71210
We never got to the bottom of what was happening then...but my current client has this same issue. They do a LOT of dynamic removing and adding components to a single page app using
PrimeFaces.current().ajax().update()
as well as dynamically constructing components in Java. its a HUGE project.Here you can see duplicates in the head like
InputNumber
andFileUpload
. If I close one of their panels and open it again it will add 2 more copies.I shortened it for brevity but in
javax.faces.Resource
update the scripts are there again.Our
core.ajax
for those just automatically appends to thehead
without checking for existing CSS or JS already loaded.And thus over time our head is filling with more and more scripts and is part of their overall browser slowdown after using the app for an hour...
Reproducer
I have no idea quite how to reproduce it but I am seeing it in their code base same as that user from 2022. They are not using a Custom HeadRenderer or anything.
Expected behavior
No duplicate CSS or JS even if the head is sent duplicate scripts.
PrimeFaces edition
Community
PrimeFaces version
13.0.0
Theme
California
JSF implementation
Mojarra
JSF version
2.3
Java version
11
Browser(s)
No response
The text was updated successfully, but these errors were encountered: