-
Notifications
You must be signed in to change notification settings - Fork 406
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
Update request for "quicklink" library to fix CORS errors #419
Comments
Hi Giorgio, thanks for opening this issue. It seems like you would like to personalize the crossorigin attribute of the Fetch or Link=Prefetch tags generated by QuickLink. Would you be able to open a PR with the suggested code change? Currently the quicklink.prefetch method only support the boolean config isPriority. It would be required to switch to an option method as you suggested and that may fall as a breaking change. |
Dear @gilbertococchi @addyosmani , I would like to inform you that I have processed a pull request (#423). I would kindly appreciate instructions on any further actions necessary to ensure the validity of the above request. Thank you. Giorgio |
Good evening, I would like to inform you that I have submitted a new pull request, which includes checks for both Access-Control-Allow-Origin and Access-Control-Allow-Credentials. Could you please expedite the approval process, as my performance team requires it? Thank you @gilbertococchi @addyosmani @XhmikosR , |
Hello, I am attaching a new pull request that implements fixes to address issues with You can review the changes here: #434. Best, Giorgio |
Hi @gilbertococchi @addyosmani ,
I am contacting you to ask for an update of the “quicklink” library in order to solve a problem related to CORS errors during resource prefetching.
Specifically, I would like to have the attribute “crossorigin=”anonymous“” added while the prefetch link element is added to the DOM in the “src/prefetch.mjs” file. This is the updated code I would like to implement:
The reason for this change is to ensure that prefetched resources are not treated as opaque resources but as cors resources, thus avoiding possible CORS errors when they are retrieved from the cache.
Here is an example of the error that currently occurs when a prefetched resource is called from the cache:
Alternatively, one solution might be to allow the user to choose whether to add the “cross-origin” attribute using the API. An example of a call could be:
quicklink.prefetch("URLResource", false, {crossorigin:"anonymous"});
Thank you for your attention and timely resolution of this issue.
Sincerely yours,
Giorgio Pellegrino.
The text was updated successfully, but these errors were encountered: