1

I am thinking about implementing a webpage preloader and I am looking at smoothstate.js and pjax.

They both seem similar in what they do but I think I am missing something. Is there any major difference between them they I should know before I implement one?

Chuck Le Butt
  • 47,570
  • 62
  • 203
  • 289
Keith Power
  • 13,891
  • 22
  • 66
  • 135

1 Answers1

2

I'm no expert, but while both handle the post event via AJAX, I think smoothState.js has more of an emphasis on creating animated transitions.

smoothState.js gives you access to three functions that allow you to easily insert animations into a page load, making the transition completely smooth:

  • onStart - Run when a link has been activated
  • onProgress - Run if the page request is still loading and onStart has finished animating
  • onEnd - Run when requested content is ready to be injected into the page

I believe PJax is just a quick and easy way to do a page load via AJAX, with less of an emphasis on making those transitions slick looking.

Chuck Le Butt
  • 47,570
  • 62
  • 203
  • 289