--- layout: default nav: dependencies ---

## Intercooler 1.2.3 - November 08, 2019

- `ic-trigger-on` now supports multiple event names, separated by commas
- The `ic-sse-with-credentials` attribute enables SSE requests to be made with credentials
- The `ic-push-params` attribute allows you to include parameter values in the pushed URL
- Bug fixes

## Intercooler 1.2.2 - March 29, 2019

- Added `ic-enhance` attribute, which enhances standard anchor and form tags with the intercooler equivalent attributes, allowing for graceful degradation in non-javascript environments.
- Added `ic-global-indicator` attribute, which sets a global indicator to be shown when a request is in flight, even along side any local indicators specified by the triggering element.
- Added `ic-switch-class` attribute, which switches a class between siblings when an intercooler request is caused within one. This can be uses, for example, to update the "active" state of tabs without replacing the tab UI.
- `LeadDyno.startPolling()` and `LeadDyno.stopPolling()` were added to the Javascript API
- Added `X-IC-Title-Encoded` response header to handle URI encoded titles for international users
- Removed the legacy debugger
- Bug fixes

## Intercooler 1.2.1 - December 15, 2017

- Added the `once` modifier to the `ic-trigger-on` attribute, to allow an event to trigger one and only one request.
- Added the `ic-transform-response` attribute to allow transforming JSON responses from a server into HTML on the client side.
- Fixed a bug that prevented `ic-on-beforeTrigger` from working properly
- Deeper tests and an explaination around how returning values from intercooler expression attributes work.

## Intercooler 1.2.0 - October 27, 2017

- Added `ic-disable-when-doc-hidden` and `ic-disable-when-doc-inactive` attributes to allow short-circuiting polling when a document isn't focused or active
- Added `ic-fix-ids` attribute to replace the IDs of any added elements with globally unique IDs so that they don't conflict with any existing IDs on the page.
- Better support for last-clicked elements in forms
- Added `timeout:` syntax for `ic-trigger-on` attribute
- Added four additional local `action` attributes:
  - `ic-action-beforeSend` `ic-action-success` `ic-action-error` `ic-action-complete`
  These actions are fired during the jQuery AJAX life cycle.
- Bug fixes

## Intercooler 1.1.2 - May 5th, 2017

- Fixed bug in minified file (Zepto-related)
- Other bug fixes

## Intercooler 1.1.1 - March 6th, 2017

- Fix a button related regression due to zepto support

## Intercooler 1.1.0 - February 17th, 2017

- Respect intercooler response headers even when error response codes are sent to the client (e.g. X-IC-Redirect on a 401 response)
- Support a timed value (e.g. "200ms") for the X-IC-Remove header, to allow a CSS transition
- Serialize javascript objects used in ic-include JSON form, allowing for more complex data to be included in requests
- Support zepto as an alternative to jQuery
- Include form values when a form causes a GET
- Unit tests running against jQuery v1, v2 and v3
- jQuery 3 is now the documented option

## Intercooler 1.0.3 - November 22th, 2016

- Added the `ic-action-target` attribute, allowing for a distinct target for the `ic-action` attribute.
- Added the `ic-sse-src` attribute, allowing intercooler to utilize Server Sent Events .
- Added the `ic-swap-style` attribute, making append/prepend explicit attribute-driven behaviors.
- The `ic-poll` attribute now does not ignore dependencies.

## Intercooler 1.0.2 - October 17th, 2016

- Regression Fix on Button Click

## Intercooler 1.0.1 - September 30th, 2016

- Include clicked button value in form submission, using focus
- Node.js compatibility improvements

## Intercooler 1.0.0 - September 12th, 2016

- Added the `ic-trigger-from` attribute, to allow specifying the element to listen to for the event that triggers an intercooler request.
- Bug fixes

### Intercooler 0.9.7 - June 24th, 2016

- Support for setting title with the `X-IC-Title` response header
- Support for reading and writing local variables stored in `localStorage` using the `ic-local-vars` attribute and `X-IC-Set-Local-Vars` response header.
- Support the `autofocus` attribute in intercooler AJAX responses.

### Intercooler 0.9.6 - April 22nd, 2016

- Support for invocation of global functions in the [ic-action](/attributes/ic-action.html) attribute.
- We now include the URL of the AJAX request that caused an error when we post errors to the server via the [ic-post-errors](/attributes/ic-post-errors-to.html) attribute.
- For browser compatibility reasons, intercooler sends all non-GET AJAX requests at a POST, with standard metadata for frameworks to use to interpret the actual action. If you wish to use the actual HTTP method (e.g. `DELETE`) you can now set the meta tag value `intercoolerjs:use-actual-http-method` to `true`

### Intercooler 0.9.5 - April 8th, 2016

- Removed the `ic-last-request` parameter to avoid cache busting. Server-side cookies should be used for more consistent refresh timing information.
- Bug fixes

### Intercooler 0.9.4 - Jan 29th, 2016

- Anchor tags with intercooler attributes on them now prevent event bubbling, which stops them from causing a browser to navigate as well as sending an ajax request.
- Clicking the "Cancel" button on the input prompt when using the `ic-prompt` attribute now stops intercooler from issuing an ajax request.

### Intercooler 0.9.3 - Jan 15th, 2016

- Support for the `data-*` prefix on attributes via the `<meta name="intercoolerjs:use-data-prefix" content="true"/>` meta-tag.
- Introduced the `beforeAjaxSend.ic`, which allows programmers to modify the setting hash passed to `$.ajax()` to do thinks like add headers, set content type, remove parameters, etc.
- Removed deprecated javascript methods on the `Intercooler` object.
- Bug fixes

### Intercooler 0.9.2 - Jan 1st, 2016

- File-upload/ multi-part form data support.
- Bug fixes

### Intercooler 0.9.1 - December 28th, 2015

- Support for the `ic-action` attribute, allowing for pure declarative client-side operations in intercooler.
- Bug fixes

### Intercooler 0.9.0 - September 11th, 2015

The v0.4.9 to v0.9.0 move involved extensive code changes. Please test your existing application thoroughly when you upgrade!

- `ic-select-from-response` now takes the inner HTML content of the given element, rather than the entire element. This makes the API more natural to work with, but unfortuantely breaks backwards compatibility.
- Reworked history to use remote restoration once local storage overflows.
- `ic-indicator` class will now work on next sibling of element firing request
- `ic-patch-to` attribute was added to suppor the `PATCH` action
- All non-GET requests are issued as POSTs now. This is because browsers have funky, browser dependent rules on how they handle redirects with parameters to a GET: sometimes they pass them along, sometimes they don't.
- Element transitions were moved to CSS. `Intercooler.defaultTransition()` and `Intercooler.defineTransition()` have been deprecated and now have no effect.
- `Intercooler.addURLHandler()` and `Intercooler.setRemote()` have been deprecated and now have no effect.
- `ic-add-class` and `ic-remove-class` were added to make it easy to create CSS transition based easements in your Intercooler application.
- `ic-global-include` allows you to include data with requests made by every element on a page.
- `ic-beforeTrigger` allows you execute logic before Intercooler fires a request (and potentially cancel the trigger).
- `ic-pause-polling` allows you issue an element with an `ic-poll` attribute in it that is in a paused state.
- `X-IC-ResumePolling` response header allows you to restart polling for an element.
- `ic-post-errors-to` allows you specify a URL for intercooler to post client side errors to.
- `ic-prompt` allows you to prompt the user for input before a request, asking for input.
- `ic-remove-after` allows you to remove an element after a given time period.
- `ic-scroll-to-target` and `ic-scroll-offset` allow you to scroll to the top of a target if it is not visible in the viewport.
- `ic-transition-duration` allows you to tell intercooler to wait some amount of time for a CSS transition to complete before a swap is done.
- `ic-target-id`, `ic-trigger-id` and `ic-trigger-name` parameters were all added to intercooler requests, to make it easier to dynamically determine which partial to render in response to a given url
- The `X-IC-Trigger-Data` has been deprecated. The `X-IC-Trigger` attribute can now be either a plain string for the event name, or a JSON object that satisfies the jQuery `parseJSon()` requirements, where each property is an event name to trigger, and the value of each property is an array of arguments to pass to that event.

### Intercooler 0.4.10 - April 17th, 2015

- Reworked history storage to be more stable and less leaky.
- Bug fixes

### Intercooler 0.4.9 - March 10th, 2015

- Added the `ic-select-from-response` attribute, allowing people to select sub-elements from a server response to swap in.
- Extended the `ic-include` attribute to allow for JSON name/value pairs to be included in a request.
- Default the value of `ic-always-update` to true, so you have to opt out of content swapping now.
- Added the `ic-remove-after` attribute, allowing people to remove an element after a given interval of time cleanly.

### Intercooler 0.4.8 - January 27th, 2015

- Reworked history support, with the `ic-push-url` attribute. Renamed the `X-IC-SetLocation` response header to `X-IC-PushURL` to be consistent with the new attribute.
- Include the current URL on all intercooler requests in the `ic-current-url` parameter.
- For elements with no text children, apply the fadeFast transition to children only, rather than the parent. This makes buttons look better if their content is wrapped in a span.

### Intercooler 0.4.7 - January 5th, 2015

- Added an integrated visual debugger.
- Added the 'changed' modifier for ic-trigger-on events
- Only allow one request in flight at a time for a given element.
- Allow child elements to trigger parent elements separately.
- Added `ic-trigger-delay` attribute to delay firing a request.

### Intercooler 0.4.6 - December 30th, 2014

- Added `ic-replace-target` attribute, allowing full replacement of target elements for situations like replacing a table row.
- Added the ability to target elements that are closest to a triggered element in a `ic-target` attribute via the `closest` prefix.

### Intercooler 0.4.5 - December 12th, 2014

- Added `ic-on-beforeSend`, `ic-on-success`, `ic-on-error` and `ic-on-complete` attributes.
- Always swap content containing a `script` element, so things are properly reevaluated.

### Intercooler 0.4.1 - July 4th, 2014

- Exposed `Intercooler.processElements()` in the Javascript API
- Begin sending the `X-HTTP-Method-Override` header up in intercooler requests
- Begin sending the `X-IC-Request` header up in intercooler requests

### Intercooler 0.4.0 - June 19th, 2014

- Added the `X-IC-Trigger` response header to trigger client side event handlers.
- Added the `ic-confirm` attribute.
- Merged a fix for an IE8 compatibility issue.

#### Comments on 0.4.0 Release

The big enhancement in this release (small code change, but big functionality boost!) is the `X-IC-Trigger` response header, which finally solves a tricky problem I've been wrestling with: How do you communicate server side state changes that have client-side UI ramifications that fall outside the usual Intercooler request-and-replace partial view flow?

This new mechanism allows you to cleanly separate your server side and client-side logic even in cases where the simple content-swapping approach isn't enough.

A great example is if you want to hide a modal if and only if a form in the modal submits valid data to the server. You can now easily fire an `server.accountCreated` event (as an example) from the server side and respond to that on the client side by hiding the modal. Clean, crisp and very little code!

You can download the latest `intercooler.js` from the Downloads page.

Enjoy!