Skip to content

Commit

Permalink
fix(hyper.res): prefetch assets instead of preload
Browse files Browse the repository at this point in the history
prefetching assets will cache the resources in prefetch cache and will be available for subsiquient
pages, iframes or diff domain which increases the performance in loading time of SDK
  • Loading branch information
prafulkoppalkar committed Apr 16, 2024
1 parent 35a9824 commit 44249c7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Hyperswitch-React-Demo-App/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let devServer = {
},
},
headers: {
"Cache-Control": "max-age=31536000,must-revalidate",
"Cache-Control": "must-revalidate",
},
};

Expand Down
2 changes: 1 addition & 1 deletion src/orca-loader/Hyper.res
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ let preloadFile = (~type_, ~href=``, ()) => {
let link = CommonHooks.createElement("link")
link.href = href
link.\"as" = type_
link.rel = "preload"
link.rel = "prefetch"
link.crossorigin = "anonymous"
checkAndAppend(`link[href="${href}"]`, link)
}
Expand Down
2 changes: 1 addition & 1 deletion webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ let devServer = {
// },
},
headers: {
"Cache-Control": "max-age=31536000,must-revalidate",
"Cache-Control": "must-revalidate",
},
};

Expand Down

0 comments on commit 44249c7

Please sign in to comment.