Flash Thunder
Flash Thunder

Reputation: 12036

a link - force Chrome to save file instead of opening

Is it possible to force a Chrome (and maybe other browsers) to save "mpg" file link instead of trying to open it in build-in media player via html code (and not changing settings of the browser)? I could do that via PHP with additional headers, but those files are really huge sometimes, so sending them via php wouldn't be too wise.

Before getting millions of -1s, just wanted to say that I know this is really simple question, but couldn't find an answer anywhere. Maybe it's just impossible?

Upvotes: 1

Views: 1030

Answers (1)

Dane Balia
Dane Balia

Reputation: 5367

There seems to be a solution with HTML 5 (download attribute):

<a href="path/to/file" download>Download Now</a>

Upvotes: 2

Related Questions