PHPackages                             blueweb/nette-ajax-history - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. blueweb/nette-ajax-history

ActiveLibrary[Framework](/categories/framework)

blueweb/nette-ajax-history
==========================

Adds History API support for Nette Framework 3.2+ (readonly Application).

4.0.0(2w ago)142.9k↓59.6%2MITPHPPHP &gt;=8.2

Since Mar 4Pushed 2w agoCompare

[ Source](https://github.com/blueweb/history.nette.ajax.js)[ Packagist](https://packagist.org/packages/blueweb/nette-ajax-history)[ Docs](https://github.com/blueweb/history.nette.ajax.js)[ RSS](/packages/blueweb-nette-ajax-history/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (8)Versions (9)Used By (0)

History Extension
=================

[](#history-extension)

Adds History API support to nette.ajax.js addon for Nette Framework!

This repo is a fork of [vojtech-dobes/history.nette.ajax.js](https://github.com/vojtech-dobes/history.nette.ajax.js) package with additional support for Nette 3.

All credits go to Vojtěch. Thank you!

Compatibility
-------------

[](#compatibility)

Package versionNette`^4.0``nette/application` **3.2+** (readonly `Application`), `nette/http` 3.3+, PHP 8.2+`^3.0`Nette 3.0 – 3.1**4.0.0 is a compatibility release for the readonly `Application` era.** Since `nette/application` 3.2 the `Application::$httpRequest` property is a promoted `readonly` property, so the previous reflection-based request swapping no longer works. The redirect re-run now uses the public `Application::processRequest()` API and is wrapped in the same lifecycle as `Application::run()` (`onStartup` / `onShutdown`, and `onError` on failure) so it behaves consistently with a normal request.

> **Note:** because the redirect re-run fires `onStartup` / `onShutdown` again within the same HTTP request, handlers bound to these events must be idempotent (this was already the case with the previous `run()`-based implementation).

Installation
------------

[](#installation)

1. Link `client-side/history.ajax.js` after `nette.ajax.js`.
2. Load PHP files with Composer: `blueweb/nette-ajax-history`
3. Register config extension in your configuration:

```
extensions:
	ajaxHistory: Blueweb\NetteAjax\HistoryExtension

```

Usage
-----

[](#usage)

Write your application as normal. All redirects and forwards will be properly handled.

To correctly update UI, use snippets. If you plan to ajaxify whole application, consider adding this snippet to your `beforeRender()` method in `BasePresenter`.

```
if ($this->isAjax()) {
	$this->invalidateControl('title');
	$this->invalidateControl('content');
}
```

And `app/@layout.latte` might be upgraded accordingly:

```
...
```

```
{snippet content}
	{include content}
{/snippet}
```

### Disabling

[](#disabling)

If you want specific links or forms exclude from scope of this addon (not make them update the URL), you can use `data-ajax-off` feature of *nette.ajax.js*.

```

```

UI Caching
----------

[](#ui-caching)

Extension will automatically cache your UI and restore it on *Back* and *Forward* buttons without communication with server. If you wish to call server on every *Back* and *Forward*, turn caching off.

```
$.nette.ext('history').cache = false;
```

Changelog
---------

[](#changelog)

### 4.0.0

[](#400)

- **BREAKING:** requires `nette/application` 3.2+ (readonly `Application`). Not compatible with Nette &lt; 3.2.
- Replaced reflection-based `Application::$httpRequest` swapping with the public `Application::processRequest()` API (the property is now `readonly` and cannot be mutated).
- Redirect re-run is wrapped in the same lifecycle events as `Application::run()` (`onStartup` / `onShutdown`, `onError` on failure).
- Fixed `Nette\Http\Request` construction for `nette/http` 3.3 (non-nullable `array` / `string` constructor arguments).
- Declared previously transitive dependencies explicitly: `nette/routing`, `nette/utils`.
- Removed the legacy Nette 2.x `Nette\Config\CompilerExtension` class alias.

###  Health Score

60

—

FairBetter than 98% of packages

Maintenance97

Actively maintained with recent releases

Popularity31

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 64.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~641 days

Recently: every ~191 days

Total

8

Last Release

15d ago

Major Versions

1.0.0 → 2.0.02015-01-17

2.0.0 → 3.0.02022-03-21

3.0.4 → 4.0.02026-06-19

PHP version history (3 changes)1.0.0PHP &gt;=5.3.1

3.0.0PHP &gt;=7.2

4.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/829270?v=4)[Blueweb](/maintainers/blueweb)[@blueweb](https://github.com/blueweb)

---

Top Contributors

[![vojtech-dobes](https://avatars.githubusercontent.com/u/415925?v=4)](https://github.com/vojtech-dobes "vojtech-dobes (29 commits)")[![semisedlak](https://avatars.githubusercontent.com/u/1753633?v=4)](https://github.com/semisedlak "semisedlak (9 commits)")[![jiripudil](https://avatars.githubusercontent.com/u/1042159?v=4)](https://github.com/jiripudil "jiripudil (2 commits)")[![vysinsky](https://avatars.githubusercontent.com/u/3693578?v=4)](https://github.com/vysinsky "vysinsky (1 commits)")[![enumag](https://avatars.githubusercontent.com/u/539462?v=4)](https://github.com/enumag "enumag (1 commits)")[![zipper](https://avatars.githubusercontent.com/u/3872371?v=4)](https://github.com/zipper "zipper (1 commits)")[![hranicka](https://avatars.githubusercontent.com/u/3034538?v=4)](https://github.com/hranicka "hranicka (1 commits)")[![ne0-cz](https://avatars.githubusercontent.com/u/4149446?v=4)](https://github.com/ne0-cz "ne0-cz (1 commits)")

---

Tags

netteajaxnette.ajax.js

### Embed Badge

![Health badge](/badges/blueweb-nette-ajax-history/health.svg)

```
[![Health](https://phpackages.com/badges/blueweb-nette-ajax-history/health.svg)](https://phpackages.com/packages/blueweb-nette-ajax-history)
```

###  Alternatives

[nette/bootstrap

🅱 Nette Bootstrap: the simple way to configure and bootstrap your Nette application.

68637.6M653](/packages/nette-bootstrap)[nette/application

🏆 Nette Application: a full-stack component-based MVC kernel for PHP that helps you write powerful and modern web applications. Write less, have cleaner code and your work will bring you joy.

45715.9M1.1k](/packages/nette-application)[nette/web-project

Nette: Standard Web Project

10993.3k](/packages/nette-web-project)[contributte/translation

Symfony/Translation integration for Nette Framework.

781.9M60](/packages/contributte-translation)[vojtech-dobes/nette-ajax-history

Adds History API support for Nette Framework.

30181.3k2](/packages/vojtech-dobes-nette-ajax-history)[nasext/dependent-select-box

Dependent Select Box for Nette Framework.

21271.2k2](/packages/nasext-dependent-select-box)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
