---
title: "Ice.Default.*"
url: https://docs.zeroc.com/ice/3.8/property-reference/ice-default-properties
language: js
docs_index: https://docs.zeroc.com/llms.txt
---

> For an index of every page, see [llms.txt](https://docs.zeroc.com/llms.txt).

# Ice.Default.\*

Programming language: JavaScript. Other languages: [C++](https://docs.zeroc.com/ice/3.8/property-reference/ice-default-properties/cpp.md), [C#](https://docs.zeroc.com/ice/3.8/property-reference/ice-default-properties/csharp.md), [Java](https://docs.zeroc.com/ice/3.8/property-reference/ice-default-properties/java.md), [MATLAB](https://docs.zeroc.com/ice/3.8/property-reference/ice-default-properties/matlab.md), [PHP](https://docs.zeroc.com/ice/3.8/property-reference/ice-default-properties/php.md), [Python](https://docs.zeroc.com/ice/3.8/property-reference/ice-default-properties/python.md), [Ruby](https://docs.zeroc.com/ice/3.8/property-reference/ice-default-properties/ruby.md), [Swift](https://docs.zeroc.com/ice/3.8/property-reference/ice-default-properties/swift.md).

## Ice.Default.EncodingVersion

`Ice.Default.EncodingVersion=ver`

If this property is not defined, Ice uses encoding version 1.1 when parsing a string that represents a proxy if this string does not specify an encoding with the `-e` option. To use encoding version 1.0 as the default instead, set this property to `1.0`:

`Ice.Default.EncodingVersion=1.0`

## Ice.Default.EndpointSelection

`Ice.Default.EndpointSelection=policy`

This property controls the default [endpoint selection](https://docs.zeroc.com/ice/3.8/runtime/connection-management/connection-establishment/js.md) policy for proxies with multiple endpoints. Permissible values are `Ordered` and `Random`. The default value of this property is `Random`.

## Ice.Default.Host

`Ice.Default.Host=host`

If an endpoint does not specify a host name (i.e., omits the `-h host` option in IP-based endpoints or the `-a address` option in a Bluetooth endpoint), the `host` value from this property is used instead. This property applies to both [client and server endpoints](https://docs.zeroc.com/ice/3.8/runtime/endpoint-syntax/js.md). It has no default value.

## Ice.Default.InvocationTimeout

`Ice.Default.InvocationTimeout=num`

Specifies the default [invocation timeout](https://docs.zeroc.com/ice/3.8/runtime/invocation/invocation-timeouts/js.md) in milliseconds to use for all proxies. The default value is `-1`, which disables the timeout.

## Ice.Default.Locator

`Ice.Default.Locator=locator`

Specifies a default [locator](https://docs.zeroc.com/ice/3.8/runtime/locators.md) for all proxies and object adapters. The value is a stringified proxy for the [IceGrid](https://docs.zeroc.com/ice/3.8/services/icegrid.md) locator object. The default locator can be overridden on a proxy using the `ice_locator` [proxy method](https://code.zeroc.com/ice/3.8/api/javascript/Ice/ObjectPrx.html). The default value is no locator.

The default identity of the IceGrid locator object is `IceGrid/Locator`, but this identity is influenced by the [IceGrid.InstanceName](https://docs.zeroc.com/ice/3.8/property-reference/icegrid-properties.md) property. The locator object is available on the IceGrid client endpoints. For example, suppose [IceGrid.Registry.Client.Endpoints](https://docs.zeroc.com/ice/3.8/property-reference/icegrid-properties.md) is set as follows:

```config
IceGrid.Registry.Client.Endpoints=tcp -p 12000 -h localhost
```

In this case, the stringified proxy for the IceGrid locator is:

```config
Ice.Default.Locator=IceGrid/Locator:tcp -p 12000 -h localhost
```

As a proxy property, you can configure additional [aspects of the proxy](https://docs.zeroc.com/ice/3.8/property-reference/proxy-properties/js.md) using properties.

## Ice.Default.LocatorCacheTimeout

`Ice.Default.LocatorCacheTimeout=num`

Specifies the default [locator cache](https://docs.zeroc.com/ice/3.8/runtime/locators/locator-semantics-for-clients/js.md) timeout for indirect proxies, in seconds. If `num` is greater than `0`, locator cache entries older than `num` seconds are ignored. If set to `0`, the locator cache is not used. The default value, `-1`, means cache entries do not expire.

Once a cache entry has expired, the Ice runtime performs a new locate request to refresh the cache before sending the next invocation; therefore, the invocation is delayed until the runtime has refreshed the entry. If you set [Ice.BackgroundLocatorCacheUpdates](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/js.md) to a non-zero value, the lookup to refresh the cache is still performed but happens in the background; this avoids the delay for the first invocation that follows expiry of a cache entry.

## Ice.Default.Protocol

`Ice.Default.Protocol=transport protocol`

Sets the [transport protocol](https://docs.zeroc.com/ice/3.8/runtime/endpoint-syntax/js.md) that is being used if an endpoint uses `default` as the transport protocol specification.

The default value is `ws` in a browser and `tcp` in Node.js.

## Ice.Default.Router

`Ice.Default.Router=router`

Specifies the default [router](https://docs.zeroc.com/ice/3.8/runtime/invocation/routers/js.md) for all proxies. The value is a stringified proxy for the Glacier2 router control interface. The default router can be overridden on a proxy using the `ice_router` [proxy method](https://code.zeroc.com/ice/3.8/api/javascript/Ice/ObjectPrx.html). The default value is no router. This property is only for proxies: it does not add a router to object adapters.

As a proxy property, you can configure additional [aspects of the proxy](https://docs.zeroc.com/ice/3.8/property-reference/proxy-properties/js.md) using properties.

## Ice.Default.SlicedFormat

`Ice.Default.SlicedFormat=num`

Specifies the encoding format of Slice classes. The default value is `0`, which selects the compact format; `1` selects the sliced format. This property applies to version 1.1 of the Ice encoding.

Note that you can also specify whether certain operations use the sliced format by annotating their definitions with [metadata](https://docs.zeroc.com/ice/3.8/slice/slice-metadata-directives/js.md).

## Ice.Default.SourceAddress

`Ice.Default.SourceAddress=addr`

In Node.js, this property supplies the local address for outgoing TCP connections. Proxy endpoints can override it with the [--sourceAddress](https://docs.zeroc.com/ice/3.8/runtime/endpoint-syntax/js.md) option. WebSocket connections use the source address selected by the operating system.
