Yan
Yan

Reputation: 1444

MP4 is downloading instead of playing

MP4 files are sometimes downloaded, and other times they play in the browser.

What is the difference between these two links?

1) If you open this URL in Chrome, the video will download:

http://video.video-mall.com/video_mall/400241188377_video.mp4

2) If you open this URL on Chrome, the video will play in the browser:

http://www.simplethoughtproductions.com/wp-content/uploads/SimpleShorts/Morning_Mail/morning_mail.mp4

Why is that?

Upvotes: 10

Views: 18962

Answers (2)

A W
A W

Reputation: 1129

With Serg's answer , I would also like to add about Content-Disposition header . If you set the Content-Disposition as inline , then your video/content will play within the browser and if you set Content-Disposition as attachment , then your browser will download it .

More info on this can be found here .

Upvotes: 4

serg
serg

Reputation: 111345

First link has Content-Type: application/octet-stream header, while the second one Content-Type: video/mp4.

Upvotes: 13

Related Questions