[blink-dev] Intent to Deprecate and Remove: WebSQL in third-party contexts

245 views
Skip to first unread message

Ari Chivukula

unread,
Jul 22, 2021, 12:16:19 PMJul 22
to blin...@chromium.org

Contact emails

ari...@chromium.org, jadek...@chromium.org, mike...@chromium.org


Specification

https://www.w3.org/TR/webdatabase/


Summary

We intend to deprecate and remove usage of WebSQL in third party contexts. Deprecation is targeted for M94 and removal is targeted for M97.


Blink component

Blink>Storage>WebSQL


Motivation

The Web SQL Database standard was first proposed in April 2009 and abandoned in November 2010. Gecko never implemented this feature and WebKit deprecated this feature in 2019. The W3C encouraged those needing web databases to adopt Web Storage or Indexed Database.


We hope to entirely deprecate and remove WebSQL at some future point when usage is low enough.


TAG review

Not needed


Risks

Based on usage measurements rolled out in milestone 91 only 0.035% of page loads use WebSQL in a third party context. Further, only 0.02% of top sites have adopted this feature.

 

Interoperability and Compatibility

 

Gecko: Never implemented

 

WebKit: Deprecated in version 608 (Safari 13)

 

Web developers: No signals

 

Debuggability

Any attempt to use this feature will be flagged in the Issues tab.


Is this feature fully tested by web-platform-tests?

Not fully, one test checks the availability of the feature.


Tracking bug

https://crbug.com/1212491


Link to entry on the Chrome Platform Status

https://www.chromestatus.com/feature/5684870116278272


Yoav Weiss

unread,
Jul 26, 2021, 6:33:33 AMJul 26
to Ari Chivukula, blink-dev
On Thu, Jul 22, 2021 at 6:16 PM Ari Chivukula <ari...@chromium.org> wrote:

Contact emails

ari...@chromium.org, jadek...@chromium.org, mike...@chromium.org


Specification

https://www.w3.org/TR/webdatabase/


Summary

We intend to deprecate and remove usage of WebSQL in third party contexts. Deprecation is targeted for M94 and removal is targeted for M97.


Blink component

Blink>Storage>WebSQL


Motivation

The Web SQL Database standard was first proposed in April 2009 and abandoned in November 2010. Gecko never implemented this feature and WebKit deprecated this feature in 2019. The W3C encouraged those needing web databases to adopt Web Storage or Indexed Database.


We hope to entirely deprecate and remove WebSQL at some future point when usage is low enough.


TAG review

Not needed


Risks

Based on usage measurements rolled out in milestone 91 only 0.035% of page loads use WebSQL in a third party context.


That's actually quite a lot. Do you have a sense of how the feature is used and what would breakage look like?
Looking at a sample of sites picked up by the HTTPArchive may reveal patterns that can help us get a better understanding of the risk here.

Further, only 0.02% of top sites have adopted this feature.

 

Interoperability and Compatibility

 

Gecko: Never implemented

 

WebKit: Deprecated in version 608 (Safari 13)

 

Web developers: No signals

 

Debuggability

Any attempt to use this feature will be flagged in the Issues tab.


Is this feature fully tested by web-platform-tests?

Not fully, one test checks the availability of the feature.


Tracking bug

https://crbug.com/1212491


Link to entry on the Chrome Platform Status

https://www.chromestatus.com/feature/5684870116278272


--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGpy5D%2BHiGthRBeCVMhL1PNdGyVaagRusPgFAnLkyF8J_gWm0g%40mail.gmail.com.

Manuel Rego Casasnovas

unread,
Jul 26, 2021, 10:46:46 AMJul 26
to Yoav Weiss, Ari Chivukula, blink-dev


On 26/07/2021 12:32, Yoav Weiss wrote:
> WebKit: Deprecated in version 608 (Safari 13)
> <https://github.com/WebKit/WebKit/commit/761bce943c0696a6bb93116eb0576ed07dbfdc65>

That's a change related to WebKitGTK+ and WPE, where they marked the API
as deprecated.

Anyway it seems this was removed in Safari (at least on WebKit2, it
might be still available in WebKit1 though). See this thread:
https://lists.webkit.org/pipermail/webkit-dev/2019-November/030970.html
And also this commit:
https://trac.webkit.org/changeset/277564/webkit

Cheers,
Rego

Ari Chivukula

unread,
Jul 26, 2021, 12:38:19 PMJul 26
to Manuel Rego Casasnovas, Yoav Weiss, blink-dev
@manuel: Thanks for the corrected code pointer!
@yoav: The sample on the platform status page (https://www.chromestatus.com/metrics/feature/timeline/popularity/3865) highlighted a bunch of Hyundai dealerships, but when loading locally I'm unable to reproduce the creation of any WebSQL databases. I did find usage on https://accounts.mint.com/index.html, but when searching the scripts which created it I found that all checked if window.openDatabase even existed. The lack of support in Gecko and WebKit seems to have broken in the deprecation/removal codepath for us.

~ Ari Chivukula (Their/There/They're)

Yoav Weiss

unread,
Jul 28, 2021, 9:21:24 AMJul 28
to blink-dev, Ari Chivukula, Yoav Weiss, blink-dev, Manuel Rego
So, you're saying that the usage we see is simply feature detection for the API and not real usage? Any way to add use counters that would confirm this?

Ari Chivukula

unread,
Jul 28, 2021, 12:38:49 PMJul 28
to Yoav Weiss, blink-dev, Manuel Rego
I'm saying something slightly different, that the usage I'm seeing is (1) checking for the existence of the function (instead of simply looking for if the engine is Blink) and (2) wrapping the subsequent call to opendatabase in a try statement (as per the spec which allows errors to be raised https://www.w3.org/TR/webdatabase/#databases). I think we're safe to (1) deprecate the function in third party contexts to alert developers to the change in M94 and then (2) raise SECURITY_ERR in a later milestone once we've completed outreach around M97 or later.

When I do (1) I could also add a counter into M94 which looks for actual usage of a created database beyond the feature detection we seem to be catching now.

~ Ari Chivukula (Their/There/They're)

Yoav Weiss

unread,
Jul 28, 2021, 12:50:47 PMJul 28
to Ari Chivukula, blink-dev, Manuel Rego
Deprecating in M94 while adding a usecounter sounds like a solid strategy. Please update this thread with the results from the usecounter once they are available.

LGTM1 to deprecate in M94 and remove support in M97, barring usecounter surprises.

Chris Harrelson

unread,
Jul 29, 2021, 6:50:14 PMJul 29
to Yoav Weiss, Ari Chivukula, blink-dev, Manuel Rego
LGTM2

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Alex Russell

unread,
Aug 5, 2021, 3:21:40 PMAug 5
to blink-dev, Chris Harrelson, Ari Chivukula, blink-dev, Manuel Rego, Yoav Weiss
LGTM3 with the caveats Yoav outlines. Would like to hear back about the new usecounter data on this thread before 97 branch point.

Thank you for taking so much care with this deprecation.

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Ari Chivukula

unread,
Aug 9, 2021, 1:00:45 PMAug 9
to Antonio Moreno, blink-dev, sligh...@chromium.org, Chris Harrelson, Manuel Rego, yoav...@chromium.org
Thanks for the feedback! I want to be sure I get to everything raised:

(1) Does your application depend on WebSQL usage in third-party contexts (i.e. in an iframe to a different origin)? If not, this deprecation/removal wouldn't apply, so I'll answer the rest of the questions assuming it does depend on third-party context WebSQL.

(2) Addressing Safari specifically: it's true a workaround existed in version 13 & 14 to disable the disable of WebSQL, but I believe that's been removed in version 15 (iOS15, macOS12, etc.) due this Fall. (If anyone has other information please speak up)

(3) As for adding a flag for third party WebSQL usage: it's possible something like that will be added based on usage (and feedback like this). However, any flag added would be a stop-gap to be removed entirely before all third-party storage is fully partitioned. There is no plan to support partitioning in WebSQL, the current plan is to fully remove it.

~ Ari Chivukula (Their/There/They're)


On Mon, Aug 9, 2021 at 4:47 AM Antonio Moreno <antonio...@openbravo.com> wrote:
Hi all,

I work as a developer in a complex business-oriented web application. This application used WebSQL as the main persistence API for a very long time. We knew that it was deprecated in the standard, and therefore we eventually migrated all our code to IndexedDb, and our latest releases do not use WebSQL at all.

However, some customers still use our previous versions, and we know that it will take some of them a significant amount of time to update to our newer release (in several cases we are talking for sure >1 year, in some it might be even more).

We would like to avoid using old versions of the browser while this happens, as we would be missing improvements and more importantly security updates. So my main question is, once the change is implemented, will it be possible via some flag to still use WebSQL temporarily in newer versions post M97?

I'm asking mainly because even though it was deprecated there, Safari still allows us to enable it back, so I was wondering if a similar feature will be available in Blink.

Thanks a lot in advance. Regards,

Antonio. 

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Ari Chivukula

unread,
Aug 9, 2021, 1:50:07 PMAug 9
to Antonio Moreno, blink-dev, sligh...@chromium.org, Chris Harrelson, Manuel Rego, yoav...@chromium.org
I'm glad that clarification helped!

(1) Yes, there will be no change to first-party WebSQL as a result of this intent.

(2) As for when first-party WebSQL will be deprecated/removed: I can't make any promises until a formal intent is sent out, but as this intent stated the plan is to deprecate/remove once usage is sufficiently low. Whereas this deprecation -> removal  was proposed to occur in 3 milestones (M94 -> M97), I would be shocked if WebSQL took fewer than 6 milestones, and would honestly expect more. Usage is still quite high, even on top sites: https://www.chromestatus.com/metrics/feature/timeline/popularity/10

~ Ari Chivukula (Their/There/They're)


On Mon, Aug 9, 2021 at 12:42 PM Antonio Moreno <antonio...@openbravo.com> wrote:
Hi Ari,

Thanks a lot for your response. To be honest, I had completely missed the "third party context" part. So this means that as long as we are creating/accessing the WebSQL database in the main domain the user is in, it will continue to be supported, at least for the time being?

If that is the case, then from our side we would be ok, our application should continue to work correctly.

Assuming that I'm correct, could you give a bit of visibility on how the team sees WebSQL going forward? Should we expect support for it to be dropped in short/mid term? Or do you anticipate the status-quo to be kept like this for a bit longer than that?

Finally, just as feedback from my side, if/when the team finally decides to fully remove support for WebSQL, it would be great if it was deprecated with a bit more time in advance so that we can warn our users with a bit more margin.

Thanks a lot for your information and insight!

Regards,

Antonio.

Antonio Moreno

unread,
Aug 13, 2021, 5:50:22 PMAug 13
to blink-dev, ari...@chromium.org, blink-dev, sligh...@chromium.org, Chris Harrelson, Manuel Rego, yoav...@chromium.org, Antonio Moreno
Hi Ari,

Thanks a lot for your response. To be honest, I had completely missed the "third party context" part. So this means that as long as we are creating/accessing the WebSQL database in the main domain the user is in, it will continue to be supported, at least for the time being?

If that is the case, then from our side we would be ok, our application should continue to work correctly.

Assuming that I'm correct, could you give a bit of visibility on how the team sees WebSQL going forward? Should we expect support for it to be dropped in short/mid term? Or do you anticipate the status-quo to be kept like this for a bit longer than that?

Finally, just as feedback from my side, if/when the team finally decides to fully remove support for WebSQL, it would be great if it was deprecated with a bit more time in advance so that we can warn our users with a bit more margin.

Thanks a lot for your information and insight!

Regards,

Antonio.

On Monday, 9 August 2021 at 19:00:45 UTC+2 ari...@chromium.org wrote:

Antonio Moreno

unread,
Aug 13, 2021, 5:50:34 PMAug 13
to blink-dev, sligh...@chromium.org, Chris Harrelson, ari...@chromium.org, blink-dev, Manuel Rego, yoav...@chromium.org
Hi all,

I work as a developer in a complex business-oriented web application. This application used WebSQL as the main persistence API for a very long time. We knew that it was deprecated in the standard, and therefore we eventually migrated all our code to IndexedDb, and our latest releases do not use WebSQL at all.

However, some customers still use our previous versions, and we know that it will take some of them a significant amount of time to update to our newer release (in several cases we are talking for sure >1 year, in some it might be even more).

We would like to avoid using old versions of the browser while this happens, as we would be missing improvements and more importantly security updates. So my main question is, once the change is implemented, will it be possible via some flag to still use WebSQL temporarily in newer versions post M97?

I'm asking mainly because even though it was deprecated there, Safari still allows us to enable it back, so I was wondering if a similar feature will be available in Blink.

Thanks a lot in advance. Regards,

Antonio. 

On Thursday, 5 August 2021 at 21:21:40 UTC+2 sligh...@chromium.org wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
Reply all
Reply to author
Forward
0 new messages