Is Safari on iOS 6 caching $.ajax results? post Cache
https://stackoverflow.com/questions/12506897/is-safari-on-ios-6-caching-ajax-results
Since the upgrade to iOS 6, we are seeing Safari's web view take the liberty of caching $.ajaxcalls. This is in the context of a PhoneGap application so it is using the Safari WebView. Our $.ajax calls are POST methods and we have cache set to false {cache:false}, but still this is happening. We tried manually adding a TimeStamp to the headers but it did not help.
We did more research and found that Safari is only returning cached results for web services that have a function signature that is static and does not change from call to call. For instance, imagine a function called something like:
getNewRecordID(intRecordType)
This function receives the same input parameters over and over again, but the data it returns should be different every time.
Must be in Apple's haste to make iOS 6 zip along impressively they got too happy with the cache settings. Has anyone else seen this behavior on iOS 6? If so, what exactly is causing it?
The workaround that we found was to modify the function signature to be something like this:
getNewRecordID(intRecordType, strTimestamp)
and then always pass in a TimeStamp parameter as well, and just discard that value on the server side. This works around the issue. I hope this helps some other poor soul who spends 15 hours on this issue like I did!
Is Safari on iOS 6 caching $.ajax results? post Cache的更多相关文章
- Safari on iOS 7 中Element.getClientRects的Bug
在Safari浏览器中,DOMElement和Range对象都提供了getBoundingClientRect方法和getClientRects方法.顾名思义,getBoundingClientRec ...
- 在mac上如何用safari调试ios手机的移动端页面
第一步:打开iphone手机的开发者模式,流程是:[设置]->[Safari]->[高级]->开启[Web检查器] ,如图1.图2 图1 图2第二步:打开Mac上Safari的开发者 ...
- iOS之safari调试iOS app web页面
Overview 当下移动端开发过程中大量使用前段H5.js等等技术,而这些web页面的调试在Xcode控制台中不太明了,经常我们移动app运行了就是方法,但是不能显示响应的效果,这时候或许就是已经报 ...
- IOS 10 微信 ajax readystate=0 status=0 解决方法
最近做了一个 基于微信访问的网页系统 发现IOS10.2.1 版本 访问的时候 AJAX报错,安卓和IOS11.4.1 没有这样的问题. 通过Fiddler抓包发现,AJAX请求时 报错信息为 {& ...
- 通过Safari获取iOS设备的UUID,远程发送更是便捷
1.获取UUID (1)在Safari上输入:http://fir.im/udid (2)点击安装描述文件,然后就可以获取到UUID了 2.fir.im提供一个非常好用的内侧平台 详情使用见:http ...
- 判断手机端用户打开页面时是android还是ios,并将判断结果通过ajax返回给url接口,传递回去
首先判断页面是android还是ios,然后利用ajax将结果通过接口url返回回去,记录到log日志中,以统计android和ios用户访问该页面的数量(数据统计) <script type= ...
- iOS 开发之使用safari对webview进行调试
转自:http://www.tuicool.com/articles/ZBFnUbz 使用safari对webview进行调试 时间 2016-02-25 14:35:20 陈斌彬的技术博客 原文 ...
- 【iOS】使用safari对webview进行调试
[iOS]使用safari对webview进行调试 在web开发的过程中,抓包.调试页面样式.查看请求头是很常用的技巧.其实在iOS开发中,这些技巧也能用(无论是模拟器还是真机),不过我们需要用到ma ...
- iOS下Audio自动播放(Autoplay)音乐
前几天做了一个H5活动页面,产品要求初始化播放音乐,因晓得H5 Audio标签支持Autoplay就没在意. 完了在手机上测试,发现手机上打开页面死活就是不会自动播放,点击播放按钮才可以播放,很是纠结 ...
随机推荐
- adb和fastboot的使用
1.前言 随着Android系统的普及,ADB(Android Debug Bridge)逐渐成了Android设备调试的必不可少的一种重要工具,该工具可以完成多种功能,例如跟踪系统日志,上传或下载文 ...
- Excel VBA业余爱好者心得及总结
我不是IT专业人士,而是一位医务工作者,当初学习Excel VBA时,是因为读研究生时的课题需要:实验仪器每天产生4个Word文件,每个文件有9个表格,总计近百个数据.为了对这些数据进行统计分析,则需 ...
- centos7下vs code编辑器字体与windows版本同步设置-安装中文字体,美化vscode
"editor.fontFamily": "Consolas, 'Courier New', monospace" 从window10系统中复制出以上字体,到C ...
- Springboot Actuator之八:actuator的执行原理
本文接着<Springboot Actuator之七:actuator 中原生endpoint源码解析1>,前面主要分析了原生endpoint的作用. 现在着重了解actuator的执行原 ...
- docker搭建MediaWiki
一.简介 MediaWiki 是 Wikipedia 使用的网站解决方案的开源版,以个人观点来看,Wiki 在这个时代显得不够时尚,且不支持 MarkDown 等新兴的标记语言,另外页面的组织方式采用 ...
- Spring Cloud之Zuul网关路由
前端请求先通过nginx走到zuul网关服务,zuul负责路由转发.请求过滤等网关接入层的功能,默认和ribbon整合实现了负载均衡 比如说你有20个服务,暴露出去,你的调用方,如果要跟20个服务打交 ...
- ML学习笔记之Anaconda中命令形式安装XGBoost(pip install)
0x00 概述 在没有安装XGBoost之前,import xgboot会出错,如下: # ModuleNotFoundError: No module named ‘xgboost’ 0x01 安装 ...
- SAP T CODE : Description (Program)
SAP T CODE : Description (Program) V : Quickstart RKCOWUSL (RKCOWUSL)V+01 : Create Sales Call (SAPMV ...
- mvc中hangfire全局简单配置
public void Configuration(IAppBuilder app) { ConfigureAuth(app); //指定使用Sql ...
- 关于乌班图18.04安装mysql不提示设置密码解决方案
1.下载安装mysql sudo apt-get update sudo apt-get install -y mysql-server mysql-client //下载mysql 运行mysql时 ...