If you need to load your site faster and without any page reloads, then Ajax Press is the right tool for you. Your site will appear faster and more im …
If you need to load your site faster and without any page reloads, then Ajax Press is the right tool for you. Your site will appear faster and more impressively using the Ajax Press plugin.
Ajax Press uses Ajax (XmlHttpRequest) and pushState deliver a fast browsing experience to your site users.
It allows you to completely transform the user experience of standard websites to make users feel like they are browsing an app, especially for those with low bandwidth connections.
No more full page reloads. No more multiple HTTP requests.
After activating the plugin, you have to configure the Ajax Press settings from the Ajax Press > Settings
page.
If your theme is listed on our predefined list, then you will see an admin notice with a button to install the default settings for your theme.
If your theme is not listed on our predefined list, then you have to set the settings manually for your theme on the Ajax Press > Settings
page.
Generally, you have to set the main content container selectors (not header navigation) which will be replaced on every page change. You have to set the main content selector in the Main content selector input box. You can use any valid CSS selector (ID, Class) in the input box.
Example: – #content
, #main
and .site-content
etc.
The vanilla js DOMContentLoaded
and jQuery ready
event runs every time the ajax request is completed.
When the ajax request is start the javascript pjax:send
event is fired. You can use this event to execute javascript at the start of the ajax request.
Example :document.addEventListener('pjax:send', function(){...your codes});
When the ajax request is completed the javascript pjax:complete
event is fired. You can use this event to execute javascript when the ajax request is completed.
Example :document.addEventListener('pjax:complete', function(){...your codes});
Use jQuery ready event instead of the ready function to initialize your jQuery codes.
Example :$(document).ready(function(){...your codes});
Not:$(document).ready(...your codes);