Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaScript not working in Safari on iPad

We have a large web application and we have found that it is not working properly in Safari on an iPad. Although we have an iPad for testing, it doesn't seem to be possible to see JavaScript errors in Safari on it. The Web Inspector feature seems to need a Mac, which we don't have.

Go to https://desktoplawyer.secureclient.co.uk/dtl/index.cfm?event=base:tryDocument&rapidocsid=5700, click Next, click "England and Wales", click Next: every other browser now takes you to a page entitled "Preliminary questions", but in Safari on the iPad it stays on the page entitled "Domicile".

What are my options? And please don't just tell me that we have to buy a Mac ;-)

like image 462
matthewk Avatar asked Oct 06 '22 18:10

matthewk


1 Answers

Something similar happened to me not too long ago. Try adding the following header on the server side responses to POST requests and see if it works:

Cache-Control: no-cache

The thing is, starting from iOS 6, Safari Mobile caches AJAX POST methods with an identical function signature. This means that the method will only be performed once and the server's response will be saved and reused for several additional requests. If you are making the same POST requests on your site several times you may have a problem getting new information.

like image 50
alemangui Avatar answered Oct 10 '22 04:10

alemangui