To forcefully download with the HTTP header, the server adds a Content-Disposition field that includes a filename parameter in the HTTP response header (line (3) in Listing 4) and, during the downloading of the external resource on the client side, the browser retrieves a filename from the HTTP response header and stores the downloaded resource with the provided filename.
Android developers often use the HTTP response header as metadata to retrieve the information of the downloaded resource.
PMHJ delivers policies from the server to the web browser via the HTTP response header. A new field named PMHJPolicy is defined in the HTTP response header.
In addition, the PMHJPolicy header field needs to be set in the HTTP response header on the server side.
- Downloading a video file to the phone's SD card, but with the filename and the HTTP response headers
changed to indicate it was not a video file ("Direct Download, Non-Video File Extension"), and