BANano 2.32
CHANGES:
1. Two ways to handle old browsers who are not ES6 compliant (like IE 11).
a. Using the BANano.DetectNoES6Support = true switch
When there is no ES6 support, an event BANano_NoES6Support is raised. You can then inform the user (e.g. with an alert) that he has to upgrade her/his browser
b. Using the BANano.ShowWarningsUnsupportedForOldBrowsers = True switch
In this case, this is more a help for you, the developer. On compilation, you get a warning that you are using some code which will not be usable in a non ES6 browser.
You can then change this code to something which will run.
For example if you set this switch to true, and you use the following code:
If BANano.CheckInternetConnectionWait Then
Log("on line")
End If
You will get a warning in the log when you compile:
[WARNING]: The method CheckInternetConnectionWait will not work in old browser!
I have added some polyfills for unsupported code (like the string methods .StartsWith/EndsWith and promises), but some things like async/await are just not working in a non ES6 compatible browser.
The ...Wait() methods use async/await, so hence the above warning.
2. Better system for updating Service Worker.
By using the version param in BANano.Initialize better, the system got a lot smarter in knowing when it has an update:
BANano.Initialize("BANano", "ChatNoir", DateTime.Now) '<----------
BANano.JAVASCRIPT_NAME = "app" & DateTime.Now & ".js"
3. New method GZipGeneratedWebsite() will GZip your html/css/js/json files on compilation. You can set a minimum filesize so small files are no compressed (it may take longer to decompress such files than the actual transfer).
4. Some warnings and optimization reminders when you are using an excessive number of CSS/Javascript files. You may not think this is important, but tests have shown your website/webapp will loose the users interest EXPONENTIALLY.
In almost all cases, you can merge, and even omit certain files because you do not use them anywhere in your code. This is especially the case for jQuery components where plugins or even whole components are loading a lot of javascript and aren't even used in your current website.
Just think this: your website may look great, but nobody will ever see it as they are long gone because it takes to long to load.
Some numbers for each one-second delay in page load time:
11% fewer page views
16% decrease in customer satisfaction
7% loss in conversions
If your website is > 1MB in CSS/Javascript files alone and takes > 2.5 seconds to load, you are probably in trouble. So these are just gentle reminders you should look into this
I will furter look into these and by analysing the source code in the future give you more tips and tricks to make your website the fastest it can be.
5. Other bug fixes in the transpiler.
Download:
https://www.b4x.com/android/forum/t...library-with-abstract-designer-support.99740/
Alwaysbusy