Since this is the answer for Analytic you can use this to not show ads on your secure pages
if ("http:" == document.location.protocol) { /*show your adds here*/ }
I got this idea from how I do analytics on my sites
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
I admit this means you can't show ads on your secure pages, but you probably don't want Google reading your secure pages contents and showing ads anyways. (That is a cop out and making excuses for Google, but as mentioned, they just don't support it)
To answer your GMail question... (using Firebug here, so I could be interpreting this wrong)
- I login to gmail with the always secure connection. No ads.
- I turn on the console to see what connections gmail makes.
- I clear the console
- I click a message that has ads shown to the right.
Gmail only made two calls. First a get to https://mail.google.com that I am guessing is my email. The second was a POST to https://mail.google.com/mail/channel/
I am guessing (everybody else correct me) Gmail requests a post from a proxy that serves the ads.
GMail sends content to proxy, proxy gets ads, proxy sends content back to Gmail. All securly.
TOTAL GUESS THERE
Thanks for the downvote but no explanation about what wasn't helpful