Coder Social home page Coder Social logo

pageaccelerator's Introduction

pageAccelerator

A very light solution to load web pages faster.

Browser Support

Chrome Firefox IE Opera Safari
5.0+ ✔ 4.0+ ✔ 10+ ✔ 11.5 ✔ 5.0+ ✔

How does it work?

It's an agnostic library that uses ajax and pushState to deliver a faster navigation experience. pageAccelerator is a very light version of turbolinks and pjax (our minfied file is just 2.2KB!). Basically what it does is follow every link in your application and each click it loads the page in background and replaces the content correctly, keeping the real datas from body and head, updating the title.

Installation

To install pageAccelerator, execute:

  npm install page-accelerator

or

  bower install page-accelerator

Or simply use the minified file from the dist/ directory.

How to use?

pageAccelerator doesn't depend on jQuery, Zepto or any other library to work. You need just to include it at the end of your HTML code:

  <script src="page-accelerator.min.js"></script>

Then you need to call the pageAccelerator function, such as the example bellow:

  pageAccelerator();

pageAccelerator can also receive a callback as a parameter - this callback will be called whenever a new page has loaded.

Just call it and pageAccelerator was already following the web application links.

For links that you don't want to be followed, you need simply add data-pageAccelerator="false".

pageaccelerator's People

Contributors

calinou avatar danielmatthew avatar evandrolg avatar michaelmior avatar rodrigohahn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.