今天遇到iphone上webkit的缓存问题,查到老外的一篇文章,感觉非常不错,转过来分享。
原文链接:http://www.yuiblog.com/blog/2010/06/28/mobile-browser-cache-limits/
下面是部分摘录:
1.Android
The Android browser exhibited the best cache behavior of all devices tested. While it appears to impose no limit on the size of individual components, the total cache size seems to be limited to approximately 2MB, which means that individual components are effectively limited to 2MB as well.
The page cache appeared to impose no limit on the size of individual pages, happily caching every byte I threw at it until the available RAM was exhausted and the browser crashed.
I was pleasantly surprised to find that Android’s component cache survived both browser restarts and power cycles, a feat none of the iOS devices was able to match.
Possible caveat: A review of Android’s WebKit source tree leads me to believe that its cache limits may adapt based on the amount of RAM and/or flash memory available on the particular device on which it’s running. If true, these numbers may only be applicable to the Nexus One. In fact, if the cache size adapts based on unused memory rather than total memory, these numbers may only be applicable to my Nexus One.
I could be mistaken, but the differences in the iOS 4.0 test results on the iPhone 3GS and iPhone 4 support this theory. (Android and Mobile Safari are both WebKit-based browsers, so they may have this behavior in common.) If you’re familiar with the WebKit source and can shed more light on this, please get in touch with me.
2.iOS
Results varied wildly across the three most recent versions of iOS. Astonishingly, Mobile Safari on iOS 3.1.3 did not cache components of any size, despite having an apparently unlimited page cache size. This is troubling since it means iOS 3.1.3 users are likely getting a suboptimal browsing experience, especially if they aren’t using wifi. The unlimited page cache size does little good here, since it only comes into play for back/forward navigations. This behavior is a significant change from what others observed in previous iOS releases and I can’t imagine any good reason for it, so I suspect this may be a bug.
Mobile Safari on iOS 3.2 (which is only available on the iPad) does not exhibit this bug. Its 25.6KB component limit and ~281.6KB total cache limit are better than nothing, but they still seem paltry compared to the other devices tested. Uniquely among iOS devices, the iPad appears to limit the size of pages in the page cache to 25.6KB, the same as its component size limit.
Mobile Safari on iOS 4.0 exhibited different limits on the iPhone 3GS and on the iPhone 4, which implies that the limits adapt based on available RAM (the iPhone 3GS has 256MB while the iPhone 4 has 512MB; both devices tested had 32GB of flash memory). On the iPhone 3GS, iOS 4.0 has a 51.199KB component size limit and a ~1.05MB total component cache size.
On the iPhone 4, the component size limit was almost exactly two times the limit on the iPhone 3GS, at 102.399KB. The total component cache size was approximately 1.9MB. Perhaps because iOS 3.2 and iOS 4.0 were developed separately but branched from a common ancestor, the iOS 4.0 page cache size appears to be limited only by available RAM on both devices tested, just like iOS 3.1.3.
None of the iOS devices preserved the contents of the cache across forced browser restarts or device power cycles, although they did preserve the cache when merely switching applications without actually killing the browser.
分享到:
相关推荐
在windows下安装Mysql系统日志出现max_open_files: 2048 max_connections: 510 table_cache: 764 类似错误是因为 max_connections 最大连接数和max_open_files、table_cache 不匹配。适当的降低max_connections 或...
In iOS Application Security, mobile security expert David Thiel reveals common iOS coding mistakes that create serious security problems and shows you how to find and fix them. After a crash course ...
解压后获得文件:《iOS 7 Programming Pushing the Limits》.pdf 全高清文字版非图片扫描版,完整!! 其中的一些目录: Part I What’s New? C h a p t e r 1 The Brand New Stuff The New UI …… Enhancements to...
Energy-efficient timetable and speed profile optimization with multi-phase speed limits: Theoretical analysis and application
lua-resty-limits 基于openresty每秒钟限制nginx请求 使用示例 local limits = require ... limits: reqs_per_range (ngx. var . binary_remote_addr , ngx. var . uri , 1 , 2 )) 由提供 如有任何疑问,请告诉我。
国外经典的《微积分预备》教材,1151页,知识点讲授非常详尽,适合自学。
iOS 7 Programming Pushing the Limits Rob Napier Mugunth Kumar ISBN: 978 1 118 81834 3 504 pages February 2014 iOS 7 Programming Pushing the Limits 1118818342 cover image Read an Excerpt Description ...
天火浏览器 当前版本:v4.0.4 大小 2.71MB 一款让你的 iPad 支持 Flash 的浏览器,这样您就可以直接使用 iPad 来观看 Flash 视频网站了,但是遗憾的是,Flash 游戏就不支持啦,作者说,iPad 上已经有足够多的...
Get ready to create killer apps for iPad and iPhone on the new iOS 7! With Apple's introduction of iOS 7, demand for developers who know the new iOS will be high. You need in-depth information about ...
在linux系统中,由于是多人多工的环境,所以会有多人共同使用一个硬盘空间的情况,如果其中有少数几个使用者大量占掉了硬盘空间,势必会压缩其他人的使用权利。
However, due to standard specification of W3C of HTML5 hasn't been drafted, and browser-alike webview in android has several limits itself, there are still many problems to be solved. Including: (1) ...
Description Learn to build ...iOS 6 Programming: Pushing the Limits gives experienced mobile developers a wealth of knowledge for creating outstanding iPhone and iPad apps on the latest platform.
精品iOS开发书籍,内容十分深入,适合高端进阶
管理系统限制的Ansible角色。 变数 limits_enabled : yes limits_path : /etc/security/limits.d/tune.conf # See http://linux.die.net/man/5/limits.conf for description limits_limits : - " * - nofile 65535...
iOS.5.Programming.Pushing.the.Limits.Developing.Extraordinary.Mobile.Apps.for.Apple.iPhone.iPad.and.iPod.Touch.Wiley
In iOS Application Security, mobile security expert David Thiel reveals common iOS coding mistakes that create serious security problems and shows you how to find and fix them. After a crash course ...
It describes and contrasts a range of approaches to the challenges and problems of this remarkable technology by means of a combination of historic papers along with commentaries to update their ...
In iOS Application Security, mobile security expert David Thiel reveals common iOS coding mistakes that create serious security problems and shows you how to find and fix them. After a crash course ...