Vaadin 24 - Browser Not Supported

Is there a way to disable Browser Not Supported information in Vaadin 24. Client uses B2B projectors, and upgrade from Vaadin 23 fails display pages.

In Vaadin 24, that logic is triggered by flow/flow-server/src/main/java/com/vaadin/flow/server/communication/IndexHtmlRequestHandler.java at f1e3b874c471015252fcf28c898f39c46ecd5520 · vaadin/flow · GitHub. It checks whether the browser supports the CSSLayerBlockRule feature. If you’re using a browser that doesn’t support this feature, then it’s likely that other things will also not work even if you would bypass the check.

If you still want to try, then what you can do is to define a custom IndexHtmlRequestListener that removes that script snippet from the HTML page.

Thanks for the details, Leif!

The device browser Michal mentioned displays Vaadin 23 apps fine, but fails with Vaadin 24 when the browser support check is removed with errors on modern JS syntax, e.g. optional chaining ?./ nullish coalescing ?? and Object.hasOwn.

In Vaadin 23 docs, transpilation is described as converting ES6 to ES5, but in Vaadin 24 docs, transpilation is described as converting TypeScript to JavaScript ES2021. Do you think it’s possible in Vaadin 24 to configure the frontend build to target ES5 during transpiling or otherwise generate a bundle comparable to Vaadin 23? If not, is there any other recommended approach that’s known to work for embedded/older browsers?

Some parts might work if you customize the target version used when transpiling but doing so would not be supported by Vaadin. In particular, there are also features such as the above mentioned CSSLayerBlockRule that are probably not even handled by the transpiler since it relates to a CSS feature and not a JavaScript feature.

What that means is really that if you need to support those older embedded browsers, then the only reliable way is to keep using Vaadin 23.

Thanks for clarifying the limitations! We’ll experiment and see what we can come up with.