Releases: TogaTech/tApp
Fix Script Tags
Previously, script tags in view files were not run when loaded through routes. This issue has been fixed.
Full Offline Functionality
In this release, tApps can now work fully offline through a pre-made service worker. Using tApp.install()
automatically registers the premade service worker, but a service worker URL can be passed through the method. tApp.update()
will attempt to update the service worker, and tApp.uninstall()
will attempt to remove the service worker. For offline POST
requests, a developer can modify the commented lines in the service worker and insert edge cases for if a POST
request fails (by default, normal POST
behavior is executed). There are also some improvements to the caching system.
Request Parameters Data
Now, in tApp.route
, the render function can now take a parameter containing details about a request. Here is a sample input:
{
type: "GET",
referrer: "#/",
data: null
}
Offline data storage
With offline data storage, tApps can store persistent data as key-value pairs offline on the user's computer, with methods to get data, set data, remove data, get all data keys, get all data, and clear data.
Improved Cache Size Accuracy
Now, the cache size is even more accurate.
Improved Cache Size Updating
The cache size updating is now more accurately calculated.
Persistent Caching and Caching Functions
This update adds persistent page caching through indexedDB. Additionally, tApp now has asynchronous methods to get a cached page, set a cached page, remove a cached page, get all cached paths, get all cached pages, and clear cached pages.
Background Page Caching
Now, sections of tApps can load even faster with background page caching. In the configuration parameters, background pages can be specified and will be loaded and updated in the background when the app starts (on first page load), making sure that the first page load is not any slower than usual but ensuring that all other page loads will be near instantaneous.
Path Checker
tApp now throws an error when an invalid path is specified.