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

jQuery Cache Busting Forces Half Megabyte Download on Every Mirador Load #1627

Open
miqrogroove opened this issue Oct 2, 2024 · 2 comments

Comments

@miqrogroove
Copy link
Contributor

Unresolved problem described in #1551, which has been closed, still needs work.

jQuery cache busting used when loading the overlay resources. For example, on every click of a thumbnail for the Mirador viewer, the browser is required to perform an ajax request for a half megabyte file named mirador.js. This causes an unnecessary delay in rendering even on faster connections. The Universal viewer implementation doesn't seem to have the same bug.

@miqrogroove
Copy link
Contributor Author

Workaround

Add this statement:

jQuery.ajaxSetup({ cache: true });

Before this statement:

jQuery('#' + that.panelContentID).load(url, postData, that.closeButtonSelector ? function() {
jQuery(that.closeButtonSelector).click(function() {
that.hidePanel();
})
} : null);

I don't know if this would break anything in other areas of CA. jQuery documentation shows cache is normally true, but there is a built-in exception for script requests. If this setting is a proper boolean, it's unclear how setting it to the default value even changes anything.

@miqrogroove
Copy link
Contributor Author

This was possibly fixed in Pawtucket already. I can reproduce this only in Providence.

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