views:

102

answers:

4

I have a PHP server running on Apache, I get lots of request looks like this,

10.1.1.211 - - [02/Sep/2010:16:14:31 -0400] "GET /request?_=1283458471913&action=get_list HTTP/1.1" 200 547 0 "http://www.example.com/request" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729)" 28632 15602

The _ parameter is mysteriously added to the request. I am trying to find out who is doing that.

There is a NetScaler running in front of Apache.

+3  A: 

Probably it's a dummy parameter added by the reverse proxy to force non-cached content to be served.

Artefacto
+8  A: 

jQuery adds a parameter like that to get around IE's caching.

edit: it only adds it for get requests, and only if the option cache is false:

cache: false
Patricia
I do use jQuery but it doesn't appear in every request.
ZZ Coder
jfrobishow
I only have this one AJAX call on my page and I do set the nocache attribute. However, some requests don't have the parameter.
ZZ Coder
+1  A: 

1283458471913 is a unix timestamp in ms, probably a bot/proxy making sure that they get a fresh page and not a cached version.

Could also be jQuery which would cause this for AJAX request of you have the nocache attribute set to true.

if ( s.cache === false && type == "GET" ) {
    var ts = now();
    // try replacing _= if it is there

    var ret = s.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + ts + "$2″);
    // if nothing was replaced, add timestamp to the end

    s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&" : "?") + "_=" + ts : "");
}
jfrobishow
+1  A: 

It could be the JQuery CacheBuster parameter.


Resources :

Colin Hebert