Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
dansup
dansup
@dansup@mastodon.social  ·  activity timestamp 6 days ago

Infinite pagination can be problematic.

- Encourages endless scrolling
- Decreased performance
- Crawlers can easily slurp up data
- Can become a ripe target for AI

I'm very aware of this, and created a CursorToken pagination helper that enforces max result limits using signed cursor pagination tokens.

We're using this throughout Loops for various endpoints, and it works very well!

https://github.com/joinloops/loops-server/blob/main/app/Support/CursorToken.php

#Loops #LoopsDev

GitHub

loops-server/app/Support/CursorToken.php at main · joinloops/loops-server

The federated short video sharing platform. Contribute to joinloops/loops-server development by creating an account on GitHub.
  • Copy link
  • Flag this post
  • Block
Pēteris Krišjānis
Pēteris Krišjānis
@peteriskrisjanis@toot.lv replied  ·  activity timestamp 6 days ago

@dansup nice 🙏

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.1-beta.2 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct