-1

I need to delete files via native javascript without ajax & php, how I can do It?

I havn't seen this proposition at any other websites, so I'm not really sure about it.

2
  • JavaScript has no native concept of a file. If you want to work with a file system, then you'll need to run the JS in a host environment (such as Node.js) that provides a file system API. If you want to delete a file on a server from a web browser without setting up the server explicitly then ask yourself, if that was possible, why aren't most websites regularly deleted by trolls? Commented Jan 28, 2014 at 8:46
  • Duplicate question. check here [stackoverflow.com/questions/2450433/… [1]: stackoverflow.com/questions/2450433/… Commented Jan 28, 2014 at 8:46

1 Answer 1

0

With pure JavaScript, it can't be done. Using an AJAX call to a server side script that deletes the file would work though

btw are you want to hack something?.. just curious

How to delete a file with javascript?

Sign up to request clarification or add additional context in comments.

1 Comment

No I don't need to hack someone just I argued with a friend that ))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.