PJAX

The second generation PJAX for advanced web frameworks.

Feature

  • Basic
    • Multiple area update
    • Fallback area matching
    • CSS markless auto sync
    • Script markless auto load
    • more
  • Concurrency integration

Usage

<script src="https://cdn.jsdelivr.net/npm/pjax-api@latest"></script>
<script src="/assets/js/config.js"></script>
// config.js
import Pjax from 'pjax-api';
// or
const { Pjax } = require('pjax-api');

new Pjax({
  areas: [
    // Try the first query.
    '#header, #primary',
    // Retry with the second query when the first query doesn't match.
    '#container',
    // Retry.
    'body'
  ]
});

Browser

Requires es6 support.

  • Chrome
  • Firefox
  • Safari
  • Edge (Chromium edition only)