Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>As both of the other answers state, refreshing your AdSense advertisements automatically isn't allowed. I understand that you only intend to refresh the ad in response to user action, but it <em>still</em> isn't allowed, even though it should be!</p> <p>Remember, the reason why you want to update the advertisements is so that you can show new ones. Displaying an advertisement is called an "impression." When you use code to refresh the ads, you are automatically generating ad impressions.</p> <p><a href="https://www.google.com/adsense/support/bin/answer.py?hl=en&amp;answer=48182" rel="noreferrer" title="AdSense Program Policies">AdSense Program Policies</a> state (emphasis mine):</p> <blockquote> <p>Invalid Clicks and Impressions</p> <p>Clicks on Google ads must result from genuine user interest. <strong>Any method that artificially generates clicks or impressions on your Google ads is strictly prohibited.</strong> These prohibited methods include but are not limited to repeated manual clicks or impressions, using robots, automated click and impression generating tools, third-party services that generate clicks or impressions such as paid-to-click, paid-to-surf, autosurf, and click-exchange programs, or any deceptive software.</p> </blockquote> <p>Refreshing your advertisements is a violation of the letter of the rule against generating impressions. With that said, I think any reasonable person would agree that refreshing advertisements in an AJAX app <em>in response to user behavior</em> (e.g. in response to a click) isn't a violation of the <em>spirit</em> of the rule.</p> <p>For example, imagine rewriting your entire app to stop using AJAX. That's clearly a worse experience for your users (it's slower, the page flashes on every click, the page can't dynamically update in the background), but, by a technicality, it's not a violation of the AdSense Program Policies.</p> <p>Clearly Google <em>meant</em> to prohibit automatically replacing the advertisements every five seconds (creating a "slideshow" of advertisements). Google also meant to prohibit making your site look more attractive to advertisers by appearing to have more visits than you actually have. I'm sure they didn't <em>intend</em> to prevent you from designing a high-performance AJAX website... but unfortunately sometimes rules have unintended consequences.</p> <p>Of course, as you originally pointed out, you CAN still refresh your advertisements if you embed them in an iframe and modify its location. (<a href="http://www.jguru.com/forums/view.jsp?EID=1305379" rel="noreferrer" title="Here&#39;s how to use iframes in an AJAX application to refresh AdSense">Here's how to use iframes in an AJAX application to refresh AdSense</a>.)</p> <p>You rejected iframes in your initial question, perhaps because you knew that using iframes would violate Google's policies... but if you insist on breaking the rules, you might as well break them all the way! ;-)</p> <p>Ultimately, I think you'll find that generating impressions this way isn't worth the risk: you'll "refresh" the ads only to find that Google is just showing you the exact same ads as before.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload