30 June 2011

how to solve problem with puting file:// protocol into img tag with src attribute ?

Unfortunately due security reasons using file:// protocol in links  from remote files is impossible and disabled in most browsers.Which means it  will simply not work (except for user who switched off security polices in browsers, but i don't think so many people do that).

You can find more details in this link
http://kb.mozillazine.org/Links_to_local_pages_don't_work

Here you some quote from above site.
 "For security purposes, Mozilla applications block links to local files (and directories) from remote files. This includes linking to files on your hard drive, on mapped network drives, and accessible via Uniform Naming Convention (UNC) paths . This prevents a number of unpleasant possibilities, including: 
  • Allowing sites to detect your operating system by checking default installation paths
  • Allowing sites to exploit system vulnerabilities (e.g., C:\con\con in Windows 95/98)
  •  Allowing sites to detect browser preferences or read sensitive data"
 So..solution for this problem is simply do NOT use file:// protocol. Sounds painful and it is,but you must live with this but believe me developer who must deal with fact that website must be IE6 friendly has worse problems.