Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

157
Vistas
How do you store large amount of text for a webpage

I have a book in docx format (about 25,000 words) and I want to display about 400 words at a time on my webpage. In Python, I have an algorithm that separates the text into pages and stores that in a dictionary; however, the frontend uses JavaScript.

I have tried to export the Python output as a txt/json file, but it seems that JavaScript doesn't allow automatic file uploading and instead requires the user to upload the documents which won't work for my situation. So, do I have to store all of the text (25,000 words) in an html document and then run a JavaScript version of the Python algorithm on that and then save it into local storage or some JavaScript container?

I want to avoid using a web host for this since I don't think it is necessary.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You would typically build a web API for retrieving data, you would use a database/flat file store for storing the data and the frontend would form the presentation part. Depending on your usecase and if you are not familiar with databases, I'd suggest as a first step you could just store the pages as simple files on the backend.

So, your data i.e. the pages of the book would be stored in text or JSON. Your backend service(which can be in Python or JS or pretty much any other popular language) would have APIs that facilitate retrieving these webpages and your frontend(HTML + CSS + JS) would be responsible for capturing user input and requesting data from the backend service.

So, the flow for reading a page becomes -

  1. The user opens the frontend, which would comprise of HTML + CSS + JS
  2. The frontend retrieves a page from the backend API
  3. The backend API reads the page on your machine and returns it

If the only reason you don't want to use a backend or host is because it is not required, in my opinion what you are trying to build would typically require a backend service since you'd generally want to have control of data so that you can have other mechanisms for auth, updates to the pages, etc.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda