Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6197821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:53:22+00:00 2026-05-24T03:53:22+00:00

Update Ok – I now know where the multiple page loads are coming from!

  • 0

Update

Ok – I now know where the multiple page loads are coming from! (However, the mystery is not yet solved).

It seems that immediately after a request is made to a page containing AdSense ads, Google makes a request for exactly the same URL (one or more times)

e.g. this is what the logs look like (note requests from Mediapartners-Google):

2011-07-20 09:50:20 xxx.xxx.xxx.xxx GET /requestedURL/ 80 - xxx.xxx.xxx.xxx Mozilla/5.0+(Browserstring removed) 200 0 0 1140
2011-07-20 09:50:20 xxx.xxx.xxx.xxx GET /requestedURL/ 80 - 66.249.72.52 Mediapartners-Google 200 0 64 218
2011-07-20 09:50:22 xxx.xxx.xxx.xxx GET /requestedURL/ 80 - 66.249.72.52 Mediapartners-Google 200 0 0 171

(I should have paid more attention to the IIS logs, rather than my own application logs – it just didn’t occur to me that these multiple, identical, simultaneous request could have been coming from different sources). This also explains why I couldn’t find anything strange when analysing the request with WireShark, and why fiddler didn’t show anything strange.

So the question for the bounty now becomes:

  • Why is google making these requests so quickly after the page is requested? (I know they need to asses the page for content, but immediately after, and multiple times sees like abuse to me.)
  • What can I do to stop this?

And out of interest:

  • Has anyone else seem something similar in their logs? (or is this something weird with my AdSense account)

Ok, I’ll apologise in advance for the length!…

This question is realted to this one, regarding Google Adsense Javascript code causing errors. (of the form Unable to post message to googleads.g.doubleclick.net. Recipient has origin something.com)

I won’t duplicate all of the information there, but the conclusion seems to be that the AdSense JS is buggy. (please read the question for background if you have time).
I knew about this problem for some time, but decided to live with the JS errors rather than pulling AdSense from the site.

However, Recently I noticed that in my ASP.NET MVC2 application, Controller Actions seemed to be called twice per page request (sometimes even 3 times). Odly, it was only happening on the production server. After some thought I relalised that one difference between the Dev and Production environments was that the AdSense javscript was only active in production.

To test this I removed all adsense code from one of the production pages, and lone behold, the multiple-page-load problem went away!

I thought that perhaps it was the fact that there were general JS errors on the page that was causing the problem, so to test this I introduced some simple errors into my own JS code, however this did not cause the multiple-page-load problem to reappear.


One known situation where pages can be called multiple times per request is when there are image tags with empty src attributes, or external resource references with empty src attributes. Crucially, The most upvoted answer to the AdSense JS Bug question notes that:

“The targetOrigin argument in this call, this.la is set to
http://googleads.g.doubleclick.net. However, the new iframe was
written with its src set to about:blank.”

This seems eerily similar to the empty src issue…. This seems too much of a co-incidence, and currently I’m of the opinion that this is the problem.
[EDIT: This was a red herring]

However, I’ve no idea wehre to go from here. These multiple action calls are causing real problems (I’m having to use code blocking, serialised transactions, and all sorts of nasty hacks to limit adverse effects). Of course, I could be barking up the wrong tree entirely – I’m puzzled that I can’t find any other references to this, given the ubiquity of AdSense, and the nature of the problem (but then again the conclusions of the AdSense JS Bug question are also surprising). I would love this to turn out to be a stupid mistake on my part, so I need a sanity check.

I’d like to ask the community:

  • Has anyone else experienced this problem?, or can anyone who is using AdSense replicate and confirm it? [See note below]
  • Assuming the problem is what it seems, what can I do? (other than pulling AdSense of course)
  • If not, then what might be causing this?

To Sumarise:
– My actions are being executed 2 (sometimes 3) times per page request.

  • THIS ONLY HAPPENS WHEN GOOGLE ADSENSE ADS ARE PRESENT
  • I removed all AdSense JS and introduced an error into my own JS : Actions are called only once…
  • A similar problem can happen when empty src properties are present on the page
  • An answer to a previous question sumarises that the AdSense JS sets a src="about:blank" on an iFrame
  • I have come to the conclusion that the src="about:blank" from the AdSense code is the most likely source of the problem.
  • If I disable JavaScript on the browser, the problem goes away

Just to document the things I have ruled out:

  • This is happening across browsers: Chrome(12) Firefox(5) and IE(8).
  • I have dissabled all plugins on browsers (YSlow, Firebug etc…)
  • There are no empty src (src=""/src="#") for images, or other external resources in the html in my code
  • There are no empty url references in the css ( url('') )
  • It’s unlikely to be server side code/config problem, as it doesn’t happen in Dev (and of the few differences between dev and production is the absence of AdSence JS in Dev)

Note: For anyone looking to replicate this, it should be noted that, strangely, when the multiple action calls happen Fiddler shows only one request being sent to the server. I have no idea why this should be the case, but the server logging doesn’t lie 🙂 Perhaps someone who has prior experience with this problem when caused by empty src attributes in img tags can say whether they have seen the same behaviour with Fiddler.


Requested extra information

HTML (@Ivan)

Here’s how I’m implementing the Adsense (ids removed)

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<div class="ad">
<%if (!HttpContext.Current.IsDebuggingEnabled) { %>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-xxxxxxxxxxxxxxx";
/* xxxxxxxxxxxxxxx */
google_ad_slot = "xxxxxxxxx";
google_ad_width = 728;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>                     
<%} else { %>
<img src="/Content/images/googleAdMock728x15_4_e.gif" width="728" height="15" />
<%} %>
</div>

This is being inserted by a RenderPartial in the View:

<% Html.RenderPartial("AdSense_XXXXXX"); %>

TCP Logging (@Tomas)

So far I have done a wireshark capture:

  1. on client when requesting page on production with problem
  2. on client when requesting page on production without problem (i.e. Adsense Removed)

I can’t really see a significant difference between the two (although my network skills are not great). One thing to note is that they both seem to have a TCP retransmittion of the HTTP request immediately after the initial request – I don’t know the significance of that. I can confirm though that in case 1 the server logs reported 2 executions, and in case 2 only one execution.

Next I will try TCP logging on the server side in both cases, and post results here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T03:53:23+00:00Added an answer on May 24, 2026 at 3:53 am

    Given that the behaviour that you are observing appear to be hard to avoid, can we rather focus on workarounds?

    Can you differentiate requests based on UserAgent, and thus filter out requests.
    Could that be a viable approach for you?
    If so then you could probably base upon this approach: http://blog.flipbit.co.uk/2009/07/writing-iphone-sites-with-aspnet-mvc.html
    Here they detect iPhones, but the consept is the same for Mediapartners-Google bot.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

UPDATE - No need to answer this now, I have solved below. Hi, I'm
Update: Solved, with code I got it working, see my answer below for the
Update : Looks like the query does not throw any timeout. The connection is
Update: Now that it's 2016 I'd use PowerShell for this unless there's a really
UPDATE: Solution at bottom. I recently switched from using a set up such as
UPDATE: I made a mistake in my debugging - this question is not relavent
Update Table1 set name = (select top 1 a.col from Table2 a where Table1.num
Update: The multiple device screen dimensions is a red herring - the problem is
I am currently running into a problem where an element is coming back from
UPDATE TABLE1 set TABLE1.col1 = TABLE2.col1 FROM TABLE2 INNER JOIN TABLE3 ON COL2 =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.