Ajax Restfull unwanted parameter
Ajax Restfull unwanted parameter
Created a restfull that lists all users, but when I run the ajax datatable, it adds a parameter in front of restfull what does return an error:
URL:http://localhost:8080/apex/defy/usuarios?id=1&_=1400990180496
Not informed: ?id=1&_=1400990180496
$(document).ready(function() {
$('#example').dataTable( {
"ajax": {
"type": "GET",
"url": "http://localhost:8080/apex/defy/usuarios",
"dataSrc": "items"
},
"columns": [
{ "data": "cod_usuario" },
{ "data": "matricula" },
{ "data": "senha" },
{ "data": "validade_senha" },
{ "data": "conexao" },
{ "data": "cpf" }
]
} );
} );
any ideas?
Thanks!
Ricardo Carrer
This question has an accepted answers - jump to answer
Answers
It is the jQuery anti cache parameter. Set
ajax.cache = true
. See the jQuery documentation for more information.Allan
worked!
Thanks!