Skip to content

TerribleDev/TurboLinks.Net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build status

Add turbolink ASP.NET core 2.1 applications

This provides middlewear to add support for turbolinks.

Simply install the nuget package (TurboLinks.Net) add app.UseTurboLinks();to Startup.cs and a build of the JavaScript turbolinks file to your layout.cshtml file (one can be found in the wwwroot/js dir of the example project). Consider adding turbolinks after your static files module. You can see an example in src/TurboLinks.Net.Example

Why use turbolinks?

If you have an application that may not fit into an SPA, or just have a lot of code that is tied to .NET this provides SPA like speed by ajaxing the html and replacing the body with the results. This allows the browser to keep the cache of existing scripts. Turbolinks was made in the rails community, and a lot of existing documentation already exists.

Warning This stops page loads thus $(document).ready(function(){}) does not fire on new pages.