Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Servlet Query Args

Chuck Dumont edited this page Aug 21, 2015 · 71 revisions

This section describes the URL query args that are honored by the Aggregator servlet, version 1.2 and greater. For pre-1.2 versions, see Servlet Query Args (Pre-1.2).

In general, the core Aggregator does not know anything about URL query args. The Aggregator relies on extensions implementing the com.ibm.jaggr.service.httptransport extension point to translate URL query args into request attributes defined by the com.ibm.jaggr.core.transport.IHttpTransport interface. In addition, module builders (extensions implementing the com.ibm.jaggr.service.modulebuilder extension point) may support additional query args. The table below indicates which extension implements support for which query args.

Some query args are used only in application generated requests to load a boot layer while others are used only in loader generated requests to load additional modules. The comments in the table below indicate which apply. Loader generated requests employ various types of data encoding to conserve space, making it difficult or impossible for a human observer to decipher the request. A request decoder module is provided to allow for the decoding of loader generated requests on the client for diagnostic or debugging purposes.

Some query args have short-name aliases that are used by the transport when it generates a request in order to conserve URL space. If a query arg has a short-name alias, it is listed below the long name version in the first column.

Arg name Description
modules and moduleIds Together, these specify encodings of the modules being requested. Used only for loader generated requests.
count Specifies the number of modules requested by the modules and moduleIds query args. Used only for loader generated requets.
scripts Specifies a comma separated list of non-AMD script modules to include in the response. Typically used by application generated requests to load the loader config, the loader extension config, and the AMD loader, plus any other non-AMD script files that should be included in the application boot layer.
deps Specifies a comma separated list of AMD modules to include in the response. Used by application generated requests to specify the modules to include in the boot layer for the application. The specified modules, along with the expanded dependencies of the specified modules will be added to the boot layer, and a synthetic require call will be invoked to initialize the modules specified here. If the loader config specifies a callback function, then the specified callback will be invoked after the modules have been defined.
preloads Like deps, but these modules, along with their expanded dependencies, will not be initialized using a synthetic require call unless they are also direct or indirect dependencies of the modules specified in deps. Instead, they will reside in the loader's cache, uninitialized, until required ether explicitly, or implicitly by being a dependency of a module that has been required. This query arg is used only in application generated requests

includeUndefinedFeatureDeps

alias=iufd

If true, then module ids using the has! loader plugin with undefined features will be included in the response. This applies to both the true and false evaluations of the plugin, so, for example, the module id dojo/has!feature?moduleA:moduleB will result in both moduleA and moduleB being included in the response if feature is not defined in the request. The modules will be added to the loader's module cache and will not be defined until they are required by the application. This option is used by application generated requests to load the bootstrap layer via the deps and preloads query args. It is not used with loader generated requests.

This query arg can be used in combination with [`includeRequireDeps`](#user-content-includerequiredeps) to generate a 'whole-app' layer to populate the browser application cache for offline support, or to populate the Aggregator cache for the purpose of creating a cache-primer bundle.

This query arg was introduced in version 1.2.2

includeRequireDeps

alias=ird

If true, then the declared and expanded dependencies of any `require()` calls found in the requested modules, or the requested modules' expanded dependencies, will be included in the response. The modules will be added to the loader's module cache and will not be defined until they are required by the application. This option is used by application generated requests to load the bootstrap layer via the [`deps`](#user-content-deps) and [`preloads`](#user-content-preloads) query args. It is not used with loader generated requests.

This query arg can be used in combination with [`includeUndefinedFeatureDeps`](#user-content-includeundefinedfeaturedeps) to generate a 'whole-app' layer to populate the browser application cache for offline support, or to populate the Aggregator cache for the purpose of creating a cache-primer bundle.

This query arg was introduced in version 1.2.2

has Specifies the comma delimited list of feature names. If the feature is true on the client, then the feature name is specified unadorned.  If the feature is false on the client, then the feature name is preceded by a "!" character. Used only for application generated requests. Loader generated requests us the [`hasEnc`](#user-content-hasenc) query arg for this purpose.
hasEnc Specifies an encoded representation of the features defined on the client. The encoding is used to reduce the amount of space needed to represent the data. Used only by loader generated requests.

hasBranching

alias=hb

This query arg corresponds to the [`hasBranching`](The-loader-extension-config#user-content-hasbranching) loader extension config property. Values may be one of `true`, `false`, `1` or `0`.

optimize

alias=opt

This query arg corresponds to the [`optimize`](The-loader-extension-config#user-content-optimize) loader extension config property. Values may be one of `simple`, `whitespace`, or `none`.

expandRequire

alias=re

This query arg corresponds to the [`expandRequire`](The-loader-extension-config#user-content-expandrequire) loader extension config property. Values may be one of `true`, `false`, `1`, `0`, or `log`.

showFilenames

alias=fn

This query arg corresponds to the [`showFilenames`](The-loader-extension-config#user-content-showfilenames) loader extension config property. Values may be one of `true`, `false`, `1` or `0`.

noCache

alias=nc

This query arg corresponds to the [`noCache`](The-loader-extension-config#user-content-nocache) loader extension config property. Values may be one of `true`, `false`,`1` or `0`.
locs Specifies the locales that locales to be included in the response. See [i18n resource consolidation](i18n-resource-consolidation) for details on how this query arg is used.
configVarName Specifies the name of the config var used for the loader config. The default is `require`. This parameter may be used to specify an alternate config var name if something other than `require` is used. This information is needed only for the initial request that loads the loader config and the loader. It is used to help the Aggregator locate the loader config `deps` property so that it can expand the module list specified in the `deps` property to include nested dependencies. See Require list expansion for more details.
inlineImports A debugging aid to disable inlining of CSS imports for the request. See [CSS Optimizations](CSS-Optimizations). Values may be one of `true`, `false`, `1` or `0`, although specifying `true` or `1` has the same effect as not specifying anything.
inlineImages A debugging aid to disable inlining of images in CSS files for the request. See [CSS Optimizations](CSS-Optimizations). Values may be one of `true`, `false`, `1` or `0`, although specifying `true` or `1` has the same effect as not specifying anything.

sourcemaps

alias=sm

This query arg corresponds to the [`sourcemaps`](The-loader-extension-config#user-content-sourcemaps) loader extension config property. Values may be one of `true`, `false`, `1`, `0`, or `log`.

The [`sourceMaps`](Options#sourcemaps) option must be enabled for this query arg to be recognized.

assertNoNLS

This query arg can be specified with application generated requests for the bootstrap layer in order to ensure that NLS dependencies do not creep into the bootstrap layer during development. If the value is `true` or `1`, then the Aggregator will return a `400 - Bad Request` response status if any of the modules specified using the [`deps`](#user-content-deps) or [`preloads`](#user-content-preloads) query args, or any of those modules' expanded dependencies, include any NLS resources. You may want to keep NLS resources out of the bootstrap layer if you're using the [`i18nSplit`](The-loader-extension-config#i18nsplit) loader extension config property to segregate NLS and non-NLS resources in order to improve the cacheability of Aggregator responses in remote caches.

This query arg was introduced in version 1.2.2