Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

In developing an application that uses the SharePoint Client Object Model, we noticed that the application is not working correctly using Safari on our iPad devices. When testing on our desktops, we see "Pragma = no-cache" in the header made to the server and it works correctly. The request from Safari on the iPad is missing this header.

Does anyone know if there is a way to add this in code? One thing that seems to work is to add a datetime stamp comment in the CAML query we send. One major issue with this approach is that not all of our requests are using CAML.

I welcome any insight.

Thanks,

Guy

share|improve this question
    
Another option is to tell SharePoint/ASP.NET to never cache regardless of header values on _vti_bin/client.svc/ProcessQuery. What would be the .NET WCF way to configure this? –  Kirk Liemohn Nov 7 '12 at 19:27
add comment

1 Answer 1

We found that by adding a new load using a dummy CAML query with a remarked DateTime stamp just before the executeQuery seems to solve our issue.

---EDIT---

If you're using JSOM, then just before your "ExecuteQuery" call, add something like this (note: I used a different function to get the UTC date/time):

var blankquery = new SP.CamlQuery();
blankquery.set_viewxml("<View><Query></Query><!--" + getUTCDate() + "--></View>");
var someList = web.get_lists().getByTitle("Announcements");
var listItems = someList.getItems(blankquery);
yourContext.load(listItems, 'Include(ID)');
share|improve this answer
    
Hi Can you give me some specific steps. This would help us in fixing some issues we have in our pages –  user24920 Apr 6 at 5:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.