Skip to content
Advertisement

Is is possible to create a webpage with pagination but no database?

I’m building a website using vanilla HTML, CSS, and JavaScript. It’s a shared hosting and I only have access to the FTP, so there is no database. I don’t need the database to be honest. However I want to create a page that display some movie covers and I would like to sort by date and alphabetical order, and maybe have a pagination. Is it possible to put all the movies into a JSON file (create the JSON file manually) and fetch the data using JavaScript’s Fetch API? I think that would act like a mini database. Am I right? As I said I don’t need anything fancy just showing some movie covers and that’s all.

Advertisement

Answer

You can always fetch all the data from an API/file and only render it partially. This is called client side pagination, useful for lowering the load on browser and memory. Even pagination libraries has dedicated support for this mode, for example backbone.paginator – client mode

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement