Cannot force download of external link
download
attribute only works on same-origin urls: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a
how can i force for download a video from url?
You have to be careful if you use external link in you server. Use this code only for your server file.
<?php
header('Content-Type: application/octet-stream');
header('Content-Transfer-Encoding: Binary');
header('Content-disposition: attachment; filename="video.mp4"');
readfile('/video/offset-17408-720.mp4');
Related Topics
How to Semantically Tag Poem Text
Counter Keeps Resetting in HTML/CSS
Why Don't Svg Images Scale Using The CSS "Width" Property
Hide Email Address from Bots - Keep Mailto:
CSS: Responsive Way to Center a Fluid Div (Without Px Width) While Limiting The Maximum Width
How to Restrict My Input Type="File" to Accept Only Png Image Files Not Working in Firefox
Svg Fill Animation for The Given Path
Opening a New Tab to Read a PDF File
How to Serve HTML File from Another Directory as Actionresult
How to Allow Text to Wrap Inside a Word If Necessary
HTML5 Drag and Drop Images from a Toolbar to a Canvas
Best Practice for Using Svg Images
Scale Svg to Container Without Mask/Crop
iOS 7 - CSS - HTML Height - 100% = 692Px
Infinite Loop Slider Using Keyframes CSS3
What Is Difference Between <Pre> and <Code> HTML Tag
How to Style Unordered Lists in CSS as Comma Separated Text
How to Style a Horizontal List with Bullets Between Items Using CSS