PHPackages                             helthe/turbolinks - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. helthe/turbolinks

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

helthe/turbolinks
=================

Helthe Turbolinks Component

4.0.0(5y ago)112122.5k↑12.5%10[1 PRs](https://github.com/helthe/Turbolinks/pulls)4MITPHPPHP ^7.1||^8.0

Since Dec 24Pushed 5y ago7 watchersCompare

[ Source](https://github.com/helthe/Turbolinks)[ Packagist](https://packagist.org/packages/helthe/turbolinks)[ Docs](https://helthe.co)[ RSS](/packages/helthe-turbolinks/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (23)Used By (4)

Helthe Turbolinks [![Build Status](https://camo.githubusercontent.com/dc3a5ab16b2339a16d38e4057cc24f8348ff8c8a27b9395053c5c52d32e5d328/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f68656c7468652f547572626f6c696e6b732e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/helthe/Turbolinks) [![Scrutinizer Quality Score](https://camo.githubusercontent.com/d5414cb99ac8811309d671cf93a2eb025804addb2318b209cdafe9b2c0b35b4c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f68656c7468652f547572626f6c696e6b732f6261646765732f7175616c6974792d73636f72652e706e673f733d32633365376664356434646630336339366339373861336336323831336636623161366336326231)](https://scrutinizer-ci.com/g/helthe/Turbolinks/)
===========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#helthe-turbolinks--)

Helthe Turbolinks is a direct port of the rails [turbolinks](https://github.com/turbolinks/turbolinks) gem for projects using the Symfony [HttpFoundation Component](http://symfony.com/doc/current/components/http_foundation/introduction.html).

Versions
--------

[](#versions)

Current versions of the following gems are used:

- turbolinks: v5.0.0

Performance
-----------

[](#performance)

Turbolinks makes following links in your web application faster. Instead of letting the browser recompile the JavaScript and CSS between each page change, it keeps the current page instance alive and replaces only the body and the title in the head.

Performance improvements will vary depending on the amount of CSS and Javascript you are using. You can get up to a 2X increase when using a lot of Javascript and CSS. You can find the rails benchmarks [here](https://github.com/steveklabnik/turbolinks_test).

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

[](#installation)

### Using Composer

[](#using-composer)

#### Manually

[](#manually)

Add the following in your `composer.json`:

```
{
    "require": {
        // ...
        "helthe/turbolinks": "~4.0"
    }
}
```

#### Using the command line

[](#using-the-command-line)

```
$ composer require 'helthe/turbolinks=~4.0'
```

Usage
-----

[](#usage)

Using turbolinks requires both the usage of the javascript library and modifying the PHP response so that it can be properly processed by turbolinks.

### PHP

[](#php)

There are multiple ways to decorate the PHP response for turbolinks.

#### Manually

[](#manually-1)

You can manually decorate the response with the `Turbolinks`object.

```
