What can cause a double page request?

I am currently investigating a double query issue on my site. Not all the time, but sometimes the requested page will actually load twice ... this is not a problem in fact, as long as it is not on the PHP page, which inserts things into my db on request (my tracking script).

I read that an empty src in the image tag and an empty url () in the css background can potentially trigger a page request twice.

However, I cannot find any problems with them.

Is there anything else that can cause something like this?

ANSWER FOR MY SITUATION

After several extensive studies, it turned out that in my case, in particular, the second request comes from the Mediapartner-Google user agent. I began to notice that on pages that use the AdSense ad, I could expect a second visit to this crawler within a few seconds after I entered the page myself.

This does not seem to happen on pages without adsense ads.

I am going to note the answer below, because it looks like most situations, these are the right things to check.

+3
source share
5 answers

Reasons I've seen before:

  • Missing stylesheet or image

  • - Chrome/Firefox , HTML ..

.

( ) GET. SQL-, , - SELECT. , .

+3

, , , , .

, , ...

, , , . , double-submit.

+4

404 , , -, . CSS, JS .

+2

src="" (, <img src="" />) .

+2

We had a very strange behavior in our CMS where the iframe in the jQuery dialog of the dialog did a double insertion of the database. After hours of debugging and high-profile WTF, we nailed it. the dialog closing method set focus on the iframe of the dialog before destroying it and causing the iframe url to reload!

+1
source

Source: https://habr.com/ru/post/1744553/


All Articles