A browserAction in my Chrome extension takes about 250ms to display its popup, popup.html
. However, when popup.html
is already open in a tab in the browser, then the browserAction popup displays almost instantly.
manifest.json
:
{
"manifest_version": 2,
"version": "1.0.0",
"name": "MyExtension",
"browser_action": {
"default_icon": "icon-38x38.png",
"default_popup": "popup.html"
}
}
popup.html
:
<!doctype html>
<html>
<body>
<div>hello<div>
</body>
</html>
Chrome DevTools shows the tab fully loaded in 2ms.
How do I make it fast? Can I keep popup.html
always loaded in the background?
Modify manifest.json
to include
"background": {
"page": "popup.html"
},
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With