开发者

Can Ajax be used to manipulate client-side files?

开发者 https://www.devze.com 2022-12-23 04:05 出处:网络
Can Ajax be used to manipulate c开发者_开发技巧lient-side files? If so, how?No, ajax (=javascript) is sandboxed, it cannot access anything on the computer where the browser is running except the brows

Can Ajax be used to manipulate c开发者_开发技巧lient-side files? If so, how?


No, ajax (=javascript) is sandboxed, it cannot access anything on the computer where the browser is running except the browser. Imagine what would happen if you would surf on the web and suddenly the file C:\boot.ini is deleted :/


You can use javascript to do client-side file management if you have special permission from the browser (or other javascript-executing agent) to do so. One good way to get that is to have your script installed as part of a plug-in for Firefox or Chrome, using a toolkit such as Greasemonkey.

So, the answer is "yes, but ask for permission first!"

0

精彩评论

暂无评论...
验证码 换一张
取 消