17

I have an extension that I recently upgraded to manifest version 2. To do this I removed the background_page property in the manifest file and replaced it with background: {page: "background.html"}. This works and everything is fine. Turns out, however, that there are browsers and people out there with old versions of Chrome, or versions of Rockmelt and other Chromium-based browsers that don't support the background-property, or the manifest_version: 2 yet.

A simple solution would be to just add the background_page: "background.html"-property to the manifest file, in addition to the background-property. This gives the warning in chrome://extension developer mode:

There were warnings when trying to install this extension:
     'background_page' requires manifest version of 1 or lower.

My question is: can having both have any negative impact? For example, what will happen when background_page is deprecated? Will my users see any warnings? Any ideas?

2 Answers 2

44

You should replace "background_page" with "background".

Like:

"background": "background.html"

Rather than:

"background": {"page": "background.html"}
1
  • Yes, I have that. The question was if having both would negatively affect the extension. Dec 30, 2012 at 11:06
5

Even thought having undocumented, deprecated or experimental attributes in manifest.json gives warnings, these warnings are only visible with "Developer mode" active. They don't affect end-user. In my option you are perfectly fine keeping background-page: in your manifest.

You can also consider using minimum_chrome_version to block users with older browsers from downloading your latest update. It's a bit too late for that (since your manifest_vesion: 2 update is published) but you can do a small trick here. Downgrade to manifest_version: 1, wait for everyone to download downgraded version and, yet again, push update with manifest_version: 2 this time adding minimum_chrome_version: 18.

3
  • I think you misunderstood the manifest_version attribute. It's not your personal revision of the manifest file which you have to increase on every change, it's a format specifier. So there's no need for the downgrade-upgrade trick.
    – lapis
    Sep 22, 2013 at 11:04
  • @Psycho I'm aware of what manifest_version is for. The issue here was that OP pushed a new version of extension using manifest v2 while , back then, a lot of browsers still haven't recognized it (Chrome/Chromium version < 18). So my advice was to publish new version of his extension using old manifest v1 and, after a while, publish once again with manifest v2, this time adding minimum_chrome_version parameter. This way, old browsers won't upgrade to the new (and unsupported) version of the extension. Sep 22, 2013 at 12:23
  • I see, didn't think Chrome could update extensions without checking the manifest version.
    – lapis
    Sep 22, 2013 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.