API: JS: Server
Clone this wiki locally
This functionality is defined in
assets/js/core/server.js and is automatically loaded by the JS handler.
Current (MWF 1.2)
This functionality writes cookies for data from the following other libraries:
Each of these libraries have a
cookieName property that define the name of the cookie written.
This functionality will reload the page in the following cases:
- When a user arrives for the first time on a page powered by the MWF.
- When a user changes their capabilities (and thus classification), screen dimensions or user agent.
- When a user issues an override or unsets an override.
As such, caution should be used in allowing a user to make a POST to their first page under MWF.
Once this routine has run, this data is then exposed in the PHP API on the framework server through the objects Classification, Screen and User_Agent.
Previous (MWF 1.0-1.1)
This functionality was not necessary before MWF 1.2, as MWF 1.0-1.1 determined capabilities server-side through static metadata and then pushed the data client-side.