… in pseudo-code
What does this plugin do?
- If the HTML5 History API is not defined for this browser – exit gracefully
- Ajaxify all links specified by
selector using event delegation)
- For all of these links(greatly simplified):
- Prefetch the next page if prefetch is enabled
- Check whether internal link, real click and not
target = "_blank"
- Create a way to convert the ajax response into a format jQuery will understand – as we want to extract the content elements only from the target page.
- Add the page into memory if enabled
- Preview the new page, if enabled
- Check whether there is a hash in the original URL (special case)
- Load any new scripts(inline/external JS, CSS, style tags) on the page (deltas to current page)
- Load the target content elements into the current content elements
- Load new title
- Inform Google Analytics
Copyright 2005-2020, 4nf.org. All rights reserved.
Latest update: 27. March 2020