PDA

View Full Version : Why all my GET request has a _dc param?



bryanevil
12 Jul 2010, 2:08 AM
Hi all

Why all my URL GET request has a _dc param included? How to take it off?

Bryan

Condor
12 Jul 2010, 2:12 AM
dc stands for disableCache.

You can specify disableCache:false in your request, but that would mean that the request would come from the browser cache and not from the server if you ever requested the same data before.

Do you really want that?

bryanevil
14 Jul 2010, 12:38 AM
dc stands for disableCache.

You can specify disableCache:false in your request, but that would mean that the request would come from the browser cache and not from the server if you ever requested the same data before.

Do you really want that?


No i dont want that. But I don't see a reason it have to include this in my URL request.

evant
14 Jul 2010, 12:41 AM
The _dc param gets sent as a timestamp. Since this is unique (well, unless you're sending off a bunch of requests in the same ms), it means the request will be treated as new and you won't get a cached reply.

Condor
14 Jul 2010, 12:55 AM
So, if you don't want to get data from the browser cache you have two options:
1. Use POST instead of GET.
2. Make your URL unique (e.g. by adding a _dc=<timestamp> parameter).