Hiya - I've been working on a project that is accessed via WebDirect and uses a web viewer to display Javascript-generated charts and tables. Before 21.1, I needed to encode the html into Base64, and then use ""data:text/html;base64" in the web viewer to decode the encoded html.
Interestingly I could never get this to work in iPadOS or iOS when using Base64Encoding, and it of course would take extra processor cycles on the desktop, so I've used variations of the following code:
If ( PatternCount ( Lower ( Get ( ApplicationVersion ) ) ; "web" ) ;
// then
"data:text/html;base64," &
Base64Encode ( Substitute ( DEV_Libraries_html_Selected::Code ;
[ "~CSS" ; DEV_Libraries_css_Selected::Code ] ;
[ "~CODE" ; Evaluate ( DEV_WebObjects_Selected::FMCode ) ] ) ) ;
// else
"data:text/html," &
Substitute ( DEV_Libraries_html_Selected::Code ;
[ "~CSS" ; DEV_Libraries_css_Selected::Code ] ;
[ "~CODE" ; Evaluate ( DEV_WebObjects_Selected::FMCode ) ] ) )
++++
The good news is that FM Server 21.1 no longer requires the use of Base64Encode or decoding for WebDirect solutions. Indeed, it no longer seems to work with Base64 encoding in WebDirect. But not having to do the encoding and decoding at all results in meaningfully faster interaction with the web viewer.
Have a nice day.