黑莓手机加载网页时间较长
我使用浏览器字段来显示网页,但加载页面所需的时间是 BlackBerry 上默认浏览器的四倍。我想加快加载时间。
我发现使用缓存可以减少加载时间。我使用 BlackBerry 支持论坛知识库文章 "如何为您的 BrowserField2 应用程序实现 Web 缓存",但没有加速。
还有其他解决方案还是我在使用缓存时犯了错误?
I am using a browser field to display a web page, however it takes about four times as long to load a page, as compared to the default browser on BlackBerry. I want to speed up this load time.
I found that using a cache can decrease the load time. I use the code from the BlackBerry support forum knowledgebase article "How to Implement a Web Cache for Your BrowserField2 Application", but there is no speedup.
Is there another solution or did I make a mistake in using the cache?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以缩小代码。缩小代码基本上会删除所有多余的字符(主要是空格),以使文件大小更小,从而缩短下载时间。
然而 HTML 通常不被缩小。我强烈建议仅缩小 Javascript 和 CSS。
Javascript 压缩器
CSS minifier
尝试缩小图像等文件,玩转扩展名和质量。您还可以创建仅适用于移动设备的替代 CSS,通过添加媒体类型来加载较低质量的图像(即已在 CSS 中应用的图像):
除此之外,您无能为力。您无法神奇地提高任何移动设备的下载速度,因此您应该尝试尽可能减小大小。
You can minify your code. Minifying code basically removes all excessive characters (mostly whitespaces) to make your file size smaller, thus take less longer to download.
HTML however is usually not minified. I highly suggest to minify your Javascript and CSS only.
Javascript minifier
CSS minifier
Try to reduce the file of images etc, playing with extension and quality. You can also create an alternative CSS that only applies for mobile devices, loading lower quality images (for the images that have been applied in CSS that is) by adding a media type:
Apart from that, there's little you can do. You can't magically increase the download speed of any mobile device so you should try to reduce the size as much as possible.