-
Notifications
You must be signed in to change notification settings - Fork 405
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
CROSSORIGIN, CREDENTIALS, PRIORITY and ACCEPT MIME #434
base: main
Are you sure you want to change the base?
Conversation
// TODO: Investigate using preload for high-priority | ||
// fetches. May have to sniff file-extension to provide | ||
// valid 'as' values. In the future, we may be able to | ||
// use Priority Hints here. | ||
// | ||
// As of 2018, fetch() is high-priority in Chrome | ||
// and medium-priority in Safari. | ||
return window.fetch ? fetch(url, {credentials: 'include'}) : viaXHR(url); | ||
options = {headers: {accept: '*/*'}}; |
Check warning
Code scanning / CodeQL
Missing variable declaration Warning
Hello @addyosmani , I noticed that the code in the pull request did not pass the size limit test. Could you consider increass the size limits? The increase in resource size is due to the introduction of new arguments and parameters. Thank you, |
Dear @addyosmani @XhmikosR ,
I am submitting this pull request to address issues encountered within our Luxottica e-commerce group, where we observed inconsistent resource prefetching behavior across different browsers.
Currently, three prefetching methods are implemented:
Access-Control-Allow-Origin
header, using the attributecrossorigin="anonymous"
.Access-Control-Allow-Credentials
response header.mode: "cors"
and checksAccess-Control-Allow-Origin
, whilecredentials: "include"
ensuresAccess-Control-Allow-Credentials
validation.Additionally, I have handled resource prioritization for Safari devices, adding the
priority: "low|high"
property specifically for fetch requests. All parameters are set tofalse
by default but can be adjusted as needed.The updated method signature for prefetching is as follows:
I would appreciate your review of these improvements.
Thank you,
Giorgio
c.c. @gilbertococchi