Skip to content

Commit

Permalink
update README cdn version to 4.3
Browse files Browse the repository at this point in the history
update README cdn version to 4.3
  • Loading branch information
damdo authored Dec 14, 2018
2 parents 6f9e7b3 + 2839f6e commit 2b5ece6
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ The following topics are covered:
* [Connection](https://github.com/pusher/pusher-js#connection)
* [Socket IDs](https://github.com/pusher/pusher-js#socket-ids)
* [Subscribing to Channels (Public and Private)](https://github.com/pusher/pusher-js#subscribing-to-channels)
* [Accessing Channels](https://github.com/pusher/pusher-js#accessing-channels)
* [Binding to Events](https://github.com/pusher/pusher-js#binding-to-events)
* [Default events](https://github.com/pusher/pusher-js#default-events)
* [Developing](https://github.com/pusher/pusher-js#developing)
Expand Down Expand Up @@ -60,7 +61,7 @@ const Pusher = require('pusher-js');
#### CDN

```html
<script src="https://js.pusher.com/4.2/pusher.min.js"></script>
<script src="https://js.pusher.com/4.3/pusher.min.js"></script>
```

You can also use [cdnjs.com](https://cdnjs.com/libraries/pusher) if you prefer
Expand Down Expand Up @@ -99,7 +100,7 @@ Notes:
You can import the worker script (`pusher.worker.js`, not `pusher.js`) from the CDN:

```javascript
importScripts('https://js.pusher.com/4.2/pusher.worker.min.js');
importScripts('https://js.pusher.com/4.3/pusher.worker.min.js');
```

### Node.js
Expand Down Expand Up @@ -366,6 +367,8 @@ Please note that encrypted channels are only officially supported for our 'web'
const channel = socket.subscribe('private-encrypted-my-channel');
```

## Accessing Channels

It is possible to access channels by name, through the `channel` function:

```js
Expand Down Expand Up @@ -496,17 +499,17 @@ First, clone this repository and run `npm install && git submodule init && git s

In the `dist/web` folder, you should see the files you need: `pusher.js`, `pusher.min.js`, `json2.js`, `json.min.js`, `sockjs.js` and `sockjs.min.js`. `pusher.js` should be built referencing your URLs as the dependency hosts.

First, make sure you expose all files from the `dist` directory. They need to be in a directory with named after the version number. For example, if you're hosting version 4.2.0 under `http://example.com/pusher-js` (and https for SSL), files should be accessible under following URL's:
First, make sure you expose all files from the `dist` directory. They need to be in a directory with named after the version number. For example, if you're hosting version 4.3.0 under `http://example.com/pusher-js` (and https for SSL), files should be accessible under following URL's:

http://example.com/pusher-js/4.2.0/pusher.js
http://example.com/pusher-js/4.2.0/json2.js
http://example.com/pusher-js/4.2.0/sockjs.js
http://example.com/pusher-js/4.3.0/pusher.js
http://example.com/pusher-js/4.3.0/json2.js
http://example.com/pusher-js/4.3.0/sockjs.js

Minified files should have `.min` in their names, as in the `dist/web` directory:

http://example.com/pusher-js/4.2.0/pusher.min.js
http://example.com/pusher-js/4.2.0/json2.min.js
http://example.com/pusher-js/4.2.0/sockjs.min.js
http://example.com/pusher-js/4.3.0/pusher.min.js
http://example.com/pusher-js/4.3.0/json2.min.js
http://example.com/pusher-js/4.3.0/sockjs.min.js

## SockJS compatibility

Expand Down

0 comments on commit 2b5ece6

Please sign in to comment.