Skip to content

File download via link #838

Answered by kettanaito
micha149 asked this question in Q&A
Jul 28, 2021 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Hey, @micha149.

The request your link makes is a navigation request. Such navigation requests are bypassed by design:

// Bypass navigation requests.
if (request.mode === 'navigate') {
return
}

Intercepting navigation requests may lead to all sorts of unpredictable behavior and must be avoided alongside static assets interception (like the initial HTML/CSS/JS of the page).

I can also see that what you're doing is navigating to a resource in the next tab. This may prompt the download (depending on the response), but that's not the only way to initiate an in-browser download.

Solution

To control the dow…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@micha149
Comment options

@kettanaito
Comment options

Answer selected by micha149
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants