Can we actually know if a file will open in a new tab? #3587
mrosvik
started this conversation in
Investigate
Replies: 1 comment
-
Great insights! Also, browsers may block the One way to work around this is by setting the With so many factors to consider, it might be best to avoid making assumptions about how browsers will behave when downloading files? 😊 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As part of our work on “Merking av lenker”, we discussed whether links to files should be labeled with “Opens in a new tab” or “Download”.
That led us to this question: Can we really know if a file will be downloaded or opened in a new tab?
It seems to depend on multiple factors:
We did a quick test with two links to PDF documents, one using the
download
attribute and one without — in Firefox, Chrome, and Safari. In all cases, the file was opened in the browser preview, not downloaded. To trigger a download, we had to manually change the browser settings. So in this case, neither “open in new tab” nor “download” was reliably true.This raises some important questions for how we communicate file downloads or external documents to users. If we can't guarantee the behavior, how should we set user expectations — especially from an accessibility and usability standpoint?
Beta Was this translation helpful? Give feedback.
All reactions