Removing redundant js

Removing redundant js



I'm working on an application for an PDA. a simple page with 1 listbox and 4 buttons is already 220Kb roughly.
The biggest chuck is _osjs.js which is responsible for 155Kb of the 220Kb.
Is there a way to tell OS not to use ajax and especially not to include the js.
If I need it I will add the functionality myself.
I'm doing this with the richwidgets already.

In addition to Joost ...
OutSystems advices to use the standard framework, but as Joost already explains, is pretty heavy for a PDA.

We’re working on a mobile application for PDA (Motorola MC5590).

Is there a JS file which handles only the basics for mobile browsers.
We intend to use the pocket IE browser, but on the Motorola PDA we’re going to use the Symbol PocketBrowser.

Hi Joost and Joop,

I don't think there's any standard way to replace the platform javascript.
If you really need to dig in and change it I suggest you talk to support as they can probably direct you on what's the best way to do it.

Note that IE Mobile is not supported off-the-shelf, and from the few times I've used it, it is pretty bad at rendering 90% of the web pages out there. I don't know about the Motorola browser but it is probably not as bad as IE Mobile.

Best Regards,

We've asked support also, but upto now no reply.

And yes rendering is poor, that's IE mobile.
Tomorrow we get a hand on a Motorola and will see what really is rendered.


We've got an answer from support (sorry no pictures include ...):

The _osjs.js file is the Agile Platform generated javascript code, which includes all javascript for input validation, web browser specific functions and AJAX behaviors.

Usually, with supported web browsers, we recommend use of HTTP compression, along with the caching mechanism of the browsers, this doesn’t become a problem.

If this is not possible for the PDA web browser, we suggest an alternative.

Currently, the Agile Platform from onwards, includes a setting to remove the AJAX related javascripts. If you don’t require AJAX features on that espace, you can remove the javascript associated with it by following the procedure below.

You’ll need to download and publish the Service Center Factory Configuration tool, available at our TechCenter (then access it through http://<servername>/FactoryConfiguration), and perform the following actions:


  1. Access the FactoryConfiguration espace and login using a Service Center username and password. You’ll land in an espace list page like:


  1. For each espace that you want to remove the extra AJAX Javascript code that’s automatically added by the Platform Server, access the espace link and do the following:
    1. Set the configuration Name to javascript
    2. Set the Value to noajax
    3. Press Define button


This will effectively add the system configuration javascript to that espace, making all pages of that espace void of the extra javascript content from the AJAX Framework of the Platform Server. A new Configuration will be added to that espace configuration list.



  1. Then, for the espaces that you’ve changed this setting, you’ll need to republish them to take effect of the new configuration. Please note that for these espaces, a compilation warning will be generated, like the one in image below. This will alert the developer that the AJAX Javascript won’t be available on this espace.


After applying the procedure above, on these particular espaces, the AJAX javascript will not be available, so you won’t be able to use Ajax Refresh nodes, nor Richwidgets patterns without bumping into runtime errors.

One ideia that I thought of regarding the browser:

If you have control over the windows mobile devices you may want to try Opera Mobile
It's pretty snappy and it tends to render pages very well.

True, but we are very restricted what we can use or not. ;)

(we have to use the Motorola PocketBrowser for our application)


Let us know how the PocketBrowser behaves once you get you hands on it.