serverside processing doesn't load with microsoft edge
serverside processing doesn't load with microsoft edge
I am currently working on a project using MVC5 and datatables.js. I've configured data tables to fetch the data using serverside processing via a POST call to my web api. Everything is working great in IE11, Firefox, Chrome, etc. However, when viewing using Microsoft Edge I get a blank table; no data is returned. Using the network tab in the browser I can see that the AJAX call to my web API is never called. Anyone have any ideas?
my clientside code:
$("#reviewTable").DataTable({
"processing": true,
"serverSide": true,
"info": true,
"stateSave": true,
"sPaginationType": "full_numbers",
"lengthMenu": [[10, 20, 50, -1], [10, 20, 50, "All"]],
"ajax": {
"url": "@Url.Action("GetReviews","api/Reviews")",
"type": "POST"
},
"columns": [
{ "data": "ReviewName", "orderable": true },
{ "data": "Description", "orderable": true },
{ "data": "Type", "orderable": true },
{ "data": "CreatedDate", "orderable": true }
],
"order": [[0, "asc"]],
"createdRow": function (row, data, dataIndex) {
$(row).attr("data-review-id", data.ID);
}
});
Answers
Happy to have a look at a page showing the issue. This example appears to work in Edge okay for me.
Allan
Hi Allan,
Thanks for your response! It's unfortunately running on an intranet currently. I did notice the example is using a GET, I am using a POST. The example works fine on my machine using Edge as well. I was expecting the XMLHttpRequest to my web API to be called from Edge, but it never fired. No issues on other browsers using the same machine. I'll see if I can get the code to a server that's available to you. I appreciate the help.
Hello Allan,
I ran into the exact same situation as hackingchemist. I found the offending datatable option was "stateSave." If I set it to false, Edge will load the table. If it is set to true, the table will not load - AJAX call never fires. This doesn't happen in other broswers.
Does this work for you in Edge? http://live.datatables.net/kekowaci/1/edit .
It appears to be okay for me.
Are you seeing any errors in the console in Edge?
Allan
Hi Allan,
Received the following error in the console:
Dave is ready.
jsbin-3.17.11.min.js (19,16611)
SCRIPT12004: An internal error occurred in the Microsoft Internet extensions
jsbin-3.17.11.min.js (19,16799)
All I see is the animated JS GIF (http://live.datatables.net/images/jsbin_animated.gif)
Wow - that's bizarre.
Okay let's assume that's an issue local to the Live site and ignore that for the moment.
Can you link to a page showing the original issue for me so I can help to debug it.
Allan
Do you have a way for me to send you a link privately?
Absolutely, click my forum name above and then the "Send message" button.
Thanks,
Allan
I set up some samples for Allan to try in Microsoft Edge and he didn't have any issues. I also had other people try the samples and they didn't have any issues, either. My laptop is fairly new and I don't use Microsoft Edge on a regular basis, so I don't know why my copy of Microsoft Edge doesn't work with "stateSave = True" when performing server-side processing. Chances are low that this is going to affect anyone in a production environment, so I'm going to let this issue go.
Allan, I thank you very much for looking into this. You have a wonderful product and I love using it! Appreciate everything you do!
Have you tried cleaning out your cache completely in Egde and/or also removed any state saved data to ensure that it is nothing of that kind of issue?
Hello Dalex73. Yes, I've tried all the usual stuff that you've mentioned - no luck.
Just another note about Microsoft Edge... If I view in an InPrivate window, there is no issue.