A browser being able to delete a client-side file at the control of a website, no matter what language the website uses behind the scenes, is definitely a security problem and browser bug. In short: you can't. And if you figure out some way, report it to the browser makers so they can fix it.
It's a requirement from customer. I may need to discuss with him. It seems more people are looking at this post. Do you happen to be able to help me with another question? stackoverflow.com/questions/4011727/…