by trante
0 replies
  • SEO
  • |
I have s situation with AJAX and Adsense. But I don't need to refresh Ads everytime I make an AJAX call.

I have a page call it "mypage.php". I load Adsense advertisement into first div, when page is opened. My second div is empty.

After DOM is fully loaded, i make an AJAX post. And put the result into "lower_content" div. Does this break Adsense TOS?

<body>
<div id="adSense_content>
<script> adsense script </script>
</div>

<div id="lower_content">
empty in start
</div>
</body>
My js file:

$(document).ready(function() {
$.ajax({
type: "POST",
url: "/getit",
success: function(data) {
$("#lower_content").html(data);
}
});
}
Note: Why I don't load second content when page is opening? Because AJAX call replies in 6-7 seconds. To not to make visitor wait with empty page, i show layout to visitor in start, and load content in 6-7 seconds.
#adsense #ajax

Trending Topics