Yenya's World

Mon, 02 Jul 2012

404: /undefined

In IS MU, we log and evaluate errors in HTTP requests, including "404 not found". When the Referrer header points back to our site, we try to look for a broken link. Recently (last month or so), strange 404 requests started to appear in our log file:

These requests point to the location /undefined, with referrer being our root document, /. And the referrer is not fake, there is always a successful request to / from the same IP address from several seconds ago. Occasionally we get similar 404 requests, pointing to /lide/undefined, or /vyhledavani/undefined, with referrer being /lide, or /vyhledavani.

We are not able to reproduce the problem. It is not User-Agent-specific (altough most of the User-Agents with this problem are Chrome), and it is not deterministic: we got tens of these 404 requests daily out of milions total requests (and out of tens of thousands of requests to the title page). These requests are always for a non-authenticated page, and always for a page which is a directory (i.e. which is represented by the index.html or index.pl document in that directory).

I think it is related to some Javascript we include to the title page - maybe JQuery, maybe Google Analytics. I have tried to remove the Google Analytics Javascript from our title page for a day, but it did not make the problem disappear. Also, our git log from the time these requests started to appear does not show anything related. We have found the following possibly related discussions:

So, my dear lazyweb - any ideas what can be the cause of this behaviour?

Update - Tue, 03 Jul 2012: It is probably AJAX

Yesterday have added a new image to the 404 page which meets the above conditions (location ending with "/undefined", referrer being the location minus "/undefined"), and so far after > 12 hours I see exactly zero accesses to that image in my Apache logs. So this error is most probably caused by something that users can't see, i.e. AJAX requests. Not the window.location modification that himdel suggests in the coments.

Section: /computers (RSS feed) | Permanent link | 2 writebacks

About:

Yenya's World: Linux and beyond - Yenya's blog.

Links:

RSS feed

Jan "Yenya" Kasprzak

The main page of this blog

Categories:

Archive:

Blog roll:

alphabetically :-)