I think using https prevents that, but not all sites can do https.
closed as unclear what you're asking by Xander, S.L. Barth, techraf, wireghoul, WhiteWinterWolf Jul 30 '16 at 13:28
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
It is not quite clear what kind of "active content revealing my real IP" you are referring to but my guess is that you mean WebRTC which can be used to determine the public visible IP address. In this case use a browser which has no support for WebRTC or has disabled it. The TOR browser is a good choice in this regard.
Apart from that various other information leaks might reveal your public IP address, depending on the type and setup of VPN you are using. If for example your are only using some application level "VPN" (like the one built into the Opera browser) your IP address might be revealed by applications not using this "VPN", by DNS lookups or simply because IPv6 traffic is not done through the VPN.
The only thing that will commonly happen when setting up a VPN is that the DNS requests may still go directly to your ISP.