问题
I want a direct download from an external link in my project. however, when I click the link, Chrome, Explorer browser opens first. Then the file begins to descend.
The platform and plugins I use in the project are below. I would like your support.
<!DOCTYPE html>
<html>
<head>
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
<link rel="stylesheet" type="text/css" href="css/index.css">
<title>Hello World</title>
</head>
<body>
<div class="app">
<h1>Apache Cordova</h1>
<div id="deviceready" class="blink">
<p class="event listening">Connecting to Device</p>
<p class="event received">Device is Ready</p>
<a href="http://www.kiajans.com.tr/a/uploaded.rar">Download link</a>
</div>
</div>
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/index.js"></script>
</body>
</html>
来源:https://stackoverflow.com/questions/52576886/cordova-download-with-direct-link