How to use Google AdSense Ads on Responsive Websites
labnol.org
labnol.org
Until Google themselves come out and recommend a method, I'm not risking my entire Google account on a should or shouldn't. I've read the TOS a while back and changing an ad after it has been loaded or using js is pretty forbidden.
This is why it is not connected with window.onresize event, the ad is loaded just once and do not change.
Ad behavior AdSense code may not be altered, nor may the standard behavior, targeting or delivery of ads be manipulated in any way that is not explicitly permitted by Google. This includes but is not limited to the following: clicking Google ads may not result in a new browser window being launched, nor may Google ads be placed in an IFRAME.
If you ask me, loading different units through conditionals qualifies as altered. Good way to get hit with the No Explanation Ban Hammer.
I understand you want to underline the risks. It is possible Google uses some automated site code screening which will flag this for a ban. Even than, doing it server site must be completely legit.
Google suspended my adsense account for a technique which Google approved / suggested in their support forums.