我的chrome扩展程序非常简单.单击弹出窗口后,将加载iframe. chrome扩展程序有点慢.我单击该图标,大约需要一秒钟半的时间来加载,我觉得那太慢了.我希望弹出窗口立即显示,但是之后会加载iframe.或者也许有一种更快的方法...我正在格式化的网站上只有一个可见的文本框,因此从理论上讲,弹出窗口应该很快加载,但是我只是不明白.
My chrome extension is very simple. After the popup is clicked an iframe is loaded. The chrome extension is slightly slow. I click the icon and it takes about a second and a half to load, and I feel like that is too slow. I'd like the popup to show instantly but have the iframe load after.. or perhaps there is an even quicker way... The site that I am iframing only has a textbox visible so in theory the popup should load pretty quickly but I'm just not getting it.
我的清单文件基本上是:
My manifest file basically is:
"browser_action": { "default_icon": "icon128.png", "default_popup": "main.html" }, "background": { "page": "main.html" }推荐答案
与任何异步调用一样,返回它可能需要花费不确定的时间.一种干净的解决方案是简单地添加将图标加载到您的main.html.在加载iframe之后,只需隐藏加载图标即可.
As any async call, it may take an undeterminable amount of time to return. One clean solution would be to simply add a loading icon to your main.html. And after the iframe loads simply hide the loading icon.
它应该有助于改善用户体验,因为他们在单击图标后至少可以立即看到某些内容.
It should help with the user experience as they'll be able to see at least something right after clicking the icon.
更多推荐
加载chrome扩展程序弹出窗口更快
发布评论