How can I block websites in Firefox from viewing my browsing history within my browser cache? For example; I've done some Google searches that Amazon is now starting to use to target advertise; the issue here is that Amazon is able to view my history for Google; how can I prevent this at the browser level?
They can't view your history as such, they can only create a "cookie" that identifies you on one site then observe that cookie when you visit other sites which they have access to.
Technically there's the do not track header, but this requires them to honour your preference and technically they might ignore it.
Physically blocking the cookies is probably the most effective way to make tracking difficult, but plenty of legitimate functionality depends on cookies so you have to accept that your browsing experience may be degraded. Also, they could use other metadata such as your IP to track you, albeit with less accuracy.
Have you seen PrivacyBadger from the EFF?
This 'learns' which cookies track you across multiple sites, then will eventually start blocking them.
Once it's learnt a good proportion of cookies, you will want to clear all your cookies from your browser, then any old ones will be deleted.
Credits to thexacre and I would like to give you one more thing to think about: There is another way to track you besides cookies what makes it pretty difficult to escape! The attempt is new but gaining popularity.
How to track somebody without any cookie? Your browser remembers what pictures you loaded already and asks the server if there was an update (timestamp). If so, your browser reloads the updated picture, if not it shows you the cached version.
Pages like Amazon have enough resources to not only give every picture an ID, but also for every user a personified ID and keep a database about it. So even if you delete or deny any kind of cookies by sending your "personified id" to ask for possible picture updates they track you.
Why was that even implemented? You can note the loading speed if you press CTRL+F5 (reload everything) in comparison to just F5.
What can I do if I don't want to be tracked? To get out of it you need to delete / deny all cookies and delete the cache every time you open the browser (or to be exact on every page you visit). But you are lucky, only few pages started yet doing so.