I have updated the core/themes/stable/templates/navigation/pager.html.twig markup due to our requirements and this has caused the ajax functionality to stop working.
I have found that the Ajax selector is in core/modules/views/js/ajax_view.js line 99 and I need to add a new selector to make Ajax work on my view.
I have a problem with the Drupal cache. The cache remembers session and cookie values. Everything works fine if I am logged into the backend or if I turn off the Drupal cache completely. Is it possible to use php cookies and they will not be cached if I am not a logged in user? The problem is with Drupal 8.