Since this encodes a JSON string
{"def":"f:r","a":{"v":{"r":"005x0000001R9JRAA0"}},"t":1378328815840}
you can do
function removeTimestamp(uriStr) {
// Decode the JSON encoded in the URI.
var jsonObj = JSON.parse(decodeURIComponent(uriStr));
// Remove the "t" property.
delete jsonObj['t'];
// Re-encode as a URI-encoded JSON string
return encodeURIComponent(JSON.stringify(jsonObj));
}
On your input string,
var s = "%7B%22def%22%3A%22f%3Ar%22%2C%22a%22%3A%7B%22v%22%3A%7B%22r%22%3A%22005x0000001R9JRAA0%22%7D%7D%2C%22t%22%3A1378328815840%7D"
var sWithoutTimestamp = removeTimestamp(s);
alert(sWithoutTimestamp);
yields the first line below. I've put a gap where the timestamp part was so you can easily compare it to the original.
Modified: %7B%22def%22%3A%22f%3Ar%22%2C%22a%22%3A%7B%22v%22%3A%7B%22r%22%3A%22005x0000001R9JRAA0%22%7D%7D %7D
Original: %7B%22def%22%3A%22f%3Ar%22%2C%22a%22%3A%7B%22v%22%3A%7B%22r%22%3A%22005x0000001R9JRAA0%22%7D%7D%2C%22t%22%3A1378328815840%7D
JavaScript doesn't specify key iteration order, and JSON.stringify's output depends on key iteration order, so on some interpreters you might see reordering of properties, but it shouldn't affect the meaning of the output.
This code also might also do strange things if the URI is not UTF-8 encoded and contains non-ASCII code-points.
url, or retrieve theurlin astringand then edit thatstring? In both cases, a simply look over developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/… should make it clear.%7Dis a close bracket in most character sets, and probably corresponds to the%7Bat the start of the input, so is probably not part of the timestamp. Are you sure you want to remove it too?