0

I have a piece of HTML code that basically waits for 2 seconds(for a browser extension injection), if browser extension doesn't exist, the code will redirect to the browser extension's installation file and I expect the redirection will start downloading the file automatically

The code is basically like this:

<meta http-equiv="refresh" content="3;url={file_url}">

This piece of code works totally fine on Edge, Chrome and Safari but Firefox doesn't do the download. On Firefox, it still shows 200 when it is redirected to the download file but the download won't happen at all. If I directly visit the download file's url on Firefox, it will download the file.

So my guess is the meta tag http-equiv refresh doesn't work on Firefox. Is there a way to fix it?

Note: occasionally(probably once every 10 times), this piece of code will work on Firefox but most of the time, it doesn't work

TylerH
  • 20,799
  • 66
  • 75
  • 101
CipherText
  • 105
  • 1
  • 10
  • As written in other posts already, do not use `http-equiv="refresh" `. Timed refresh must not exist as it would have a critical impact on users. This would breach Guidelines: WCAG 2.1 (A), WCAG 2.0 (AA), and it will be marked as error by major web browsers today. Use javascript instead. You can read more here: https://dequeuniversity.com/rules/axe/4.4/meta-refresh – Goemon Code May 19 '23 at 17:51

0 Answers0