Icontem

JS AJAXify PushState: Make link clicks be converted into AJAX requests

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2017-02-28 (2 months ago) RSS 2.0 feedNot enough user ratingsTotal: 130 All time: 354 This week: 27Up
Version License JavaScript version Categories
ajaxifypushstate 1.0BSD License1HTML, AJAX, Web services
Description Author

This object can make link clicks be converted into AJAX requests, effectively making any web site a web application.

It can traverse the current Web page, alter the current links, so when the user clicks on them, it sends HTTP requests to the respective link URL using AJAX and loads the next page.

It uses PushState to update the page browsing history so when the user go back it restores the previous page.

The object alters all the page links with external HTTP or HTTPS URLs and replaces the given element selector with content from the AJAX response.

Innovation Award
JavaScript Programming Innovation award winner
January 2017
Winner
AJAX allows to load page content faster as it does not require to load the whole page again.

However, to take advantage of AJAX you need to change pages to send AJAX requests when the user interacts with it. You also need to update the page history, so the browser goes back to the right page when the user hits the back button.

This package provides a solution for both problems. It changes page links so when the users click on them the code sends AJAX requests to the server in order to load the next page.

At the same time, it updates the page history state, so the back button clicks will make the browser go back to the right pages.

Manuel Lemos
  Performance   Level  
Name: martin barker <contact>
Classes: 10 packages by
Country: United Kingdom United Kingdom
Age: 27
All time rank: 201 in United Kingdom United Kingdom
Week rank: 13 Up2 in United Kingdom United Kingdom Down
Innovation award
Innovation award
Nominee: 6x

Winner: 4x

  Files folder image Files  
File Role Description
Plain text file ajaxify.js Class Main Class
Accessible without login Plain text file example.js Example Example of Usage

 Version Control Unique User Downloads Download Rankings  
 0%
Total:130
This week:0
All time:354
This week:27Up
User Comments (1)