Skip to Main Content
Return to Navigation

Working with JavaScript in HTML Definitions

This topic contains an overview and discusses:

Understanding PeopleTools Minified JavaScript

At runtime, PeopleTools minifies any JavaScript code stored within an HTML definition so that the JavaScript runs more efficiently on the web server. This is the default runtime behavior. JavaScript that has been minified has been stripped down to only the essential strings required for runtime execution. It runs in this compressed, or minified, format to save bandwidth.

Knowing that the JavaScript will be minified at runtime enables developers to more freely add comments and formatting to code, making it easier to understand during design time, without introducing processing overhead at runtime.

During minification, PeopleTools removes the following items from JavaScript code within HTML definitions:

  • comments

  • most extraneous white space

  • most carriage returns

  • most tabs

If during testing or debugging you need to examine the web server cache, note that JavaScript files stored in the web server cache follow a different naming convention depending on whether they are in a minified format. For example, JavaScript in the minified format contains a MIN in the filename. For example:



The same JavaScript in an unminified format has the following filenames:



By default, PeopleTools runs JavaScript in minified mode on the web server. For development or debugging tasks, you can disable the default runtime mode for an entire PIA domain or for the current user. In general, if you are including custom JavaScript, it is recommended that you make sure it runs in unminified and minified modes. Errors as a result of minification typically generate messages in the application server log similar to:

JavaScript Minification: Found an unterminated regular expression set in <HTML Definition Name> set in <line number>.

Note: PeopleTools only minifies JavaScript contained in HTML Definitions.

Disabling JavaScript Minification for a PIA Domain

A web profile setting controls the JavaScript minification behavior for a PIA domain.

To disable minification system-wide:

  1. Select PeopleTools, Web Profile, Web Profile Configuration.

  2. Select the desired web profile name.

  3. Select the Debugging tab.

  4. Make sure the Use Unminified JavaScript check box is checked.

  5. Click Save.

  6. Restart the PIA domain.

Disabling JavaScript Minification for the Current User

Note: Disabling minified JavaScript for the current user mainly applies to a development or test environment where the Show Trace Link at Signon setting has been enabled for the current web profile, and a developer or tester was monitoring JavaScript execution in a single session. This is not an option intended for end users of a PeopleSoft application.

To disable minification for a single user:

  1. Sign out of the current application.

  2. On the PeopleSoft signon page click the Set Trace Flags link.

  3. On the trace page under the Page Generation trace settings: heading, select Unminified javascript.

  4. Enter the user ID and password and click Sign In.