Adaptive pagination plugin for web frameworks and other applications