I'm looking to initiate a download in a webpage using either JavaScript or PHP. All of the examples I've seen use an iframe to load the source of the file. Unfortunately this method doesn't seem to work with all smartphone browsers, specifically my Samsung Galaxy S3. It seems to be a known issue with some of Android's stock browsers.
I cannot use a link because the download must happen auto-magically, and using document.ready
or window.load
to initiate a window.location
call is not acceptable because even though the download initiates it stops all the JS functionality on the current page. I have some JavaScript that must run after the download has initiated.
Basically the flow is:
- Show JavaScript progress bar to simulate download progress
- Initiate download in background
- Once progress bar finishes -> jquery.show new content on page (installation instructions)
Can't seem to find a cross-browser solution that will let me get through all 3 steps above.