Connecting Tech Pros Worldwide Help | Site Map

Prevent file execution when opened in browser

Newbie
 
Join Date: Mar 2008
Posts: 4
#1: Oct 21 '08
Hi,

I have a requirement in which I have Prevent code from being executed when opened in browser. To put it in simple words, consider the following scenario
I have a locale.properties file present in webserver.
if i tries to open this file from browser, instead of displaying the content, it should popup a dialog-box asking user to open/save/cancel.

Any help in this regard will be appreciated. Let me know if my requirement is not clear.


Thanks
sunny
numberwhun's Avatar
Site Moderator
 
Join Date: May 2007
Location: New Hampshire
Posts: 2,565
#2: Oct 21 '08

re: Prevent file execution when opened in browser


Are you clicking a link to the file or putting the address of the file directly in the URL bar?

If it is a link, it might download, otherwise you can right click and save.

Regards,

Jeff
Reply