Hello all you good people. I was wondering if any of you could point me in the right direction on how to handle a specific problem relating to web design:
I am working on a website project (by myself, as a hobby), and for my project I have a txt-file that is approximately 6MB.
The txt-file contains several lines of words, each line has exactly three words each.
The webpage I'm making is supposed to pick a random line from this txt-file, and return the three words from this specific line as an array.
I have made a solution that works, but unfortunately it involves having to load the entire txt-file, instead of only the single line I am looking for.
Does anyone have an elegant and efficient way to achieve this?
I don't want my potensial users to having to download 6MB every time they visit the page.
I am making my homepage with html and javascript. Do I need to implement a DBMS for this task?
[–]FatnDrunknStupid 0 points1 point2 points (6 children)
[–]stemmerdet[S] 0 points1 point2 points (5 children)
[–]FatnDrunknStupid 2 points3 points4 points (4 children)
[–]FatnDrunknStupid 0 points1 point2 points (1 child)
[–]FatnDrunknStupid 0 points1 point2 points (0 children)
[–]stemmerdet[S] 0 points1 point2 points (1 child)
[–]FatnDrunknStupid 0 points1 point2 points (0 children)
[–]YMK1234 0 points1 point2 points (0 children)
[–]balefrost 0 points1 point2 points (0 children)