Put an URL in the address bar of Firefox, like www.abc.com/abc, and hit enter, at this moment, is DNS trying to resolve www.abc.com or resolve www.abc.com/abc? If later I click a link on abc.com webpage, which DNS detecive, your IP address try to visit the link, or abc.com try to visit?
AFAIK DNS resolves only domain. Domains can be registered and put in domain name system. Specific sites and sub-domains are not stored in DNS system.
firefox will also cache the IP address returned by he DNS server configured for your pc for a while, so it doesn't have to connect to the dns again the next time you need it for another page. it will also cache visited pages for reuse, up to a storage limit you can set, so you don't need to download the page again unless it changes.
Does FireFox (or IE ...) only send the domain name to the DNS not the sub domain? If I click a link (bcd.com) in the webpage, will bcd.com (a new domain name so need to be resolved) be sent by me (and my IP address) to the DNS or the webpage send it? If the website automatically rediect me to other site, is it me to send the URL to DNS or the website server send it to the DNS? Thank you for reply.
It's always you who is sending DNS requests to DNS server. When your browser (or any other application) tries to establish connection with other computer or server using DNS name, it needs to get information what IP is hosting that domain. Your computer gets this information from DNS system. So DNS communication is always happening between your computer and DNS server. Some more information about DNS system: http://en.wikipedia.org/wiki/Domain_Name_System
Can I set Firefox only uses the local DNS file than connecting to the online DNS, and not allow to visit if URL is not resolved by the DNS local file?
If the Windows DNS service is being used, it will work for all user applications. If you disable the Windows DNS service, then the individual internet applications will perform their own DNS resolving. In this case, a software firewall can be configured to allow or block access to DNS servers on a per-application basis.