Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete a file with javascript?

Did not have luck with these examples:
Javascript File remove
Javascript FSO DeleteFile Method
Deleting a File

There are no special permissions on the file.
Is there a way to do this in JQuery?

The requirement is - a certain file must be deleted from the web directory when another page is loaded. There is no security issue as this is on a closed network.

Any help is appreciated.

Thanks.

like image 530
T.T.T. Avatar asked Mar 15 '10 20:03

T.T.T.


1 Answers

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

like image 186
code_burgar Avatar answered Oct 04 '22 01:10

code_burgar