Maintain daily data that can be updated in JSON format

I'm working on a web application that utilizes client-side MVC with backbone.js and Spring on the server side. I have a scenario where I require data that needs to be updated daily or every couple of days. The data will be used on the client side for manipulation purposes (security is not a major concern for this data).

My initial thought was to store this data in JSON format on the client side in one or multiple files, which can be accessed and manipulated using JavaScript. It's possible that new versions of these files may need to be created daily.

Given the relatively static nature of these files, I am considering pushing them to a web server (such as Apache) instead of keeping them in the deployed War file on the server to reduce server overhead. The use case for this data involves heavy traffic.

Can you advise me on whether this approach is on the right track and if it is feasible? Additionally, how could I manage batch updates of the JSON files on the web server (Apache)?

Answer №1

Storing this information in Local Storage is a good option. Make sure to include a polyfill for older browsers to ensure compatibility.

Additionally, consider utilizing client-side databases that are built on Local Storage for an alternative solution.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Running React Boilerplate with forever is a great way to ensure your application stays

I plan on keeping the react-boilerplate application running indefinitely on the server. I recently came across forever, but I'm uncertain about how to pass parameters to it. The command to start the server looks like this: PORT=80 npm run start:produ ...

Incorporating a setup file into my JavaScript project

In my JavaScript project, I have both frontend and backend codes (NodeJS). Here is the folder structure for my production environment: /prod /server sourceCode1.js sourceCode2.js ... sourceCodeN.js index.js ...

Adding an object to a document's property array based on a condition in MongoDB using Mongoose

I have a situation where I need to push an object with a date property into an array of objects stored in a MongoDB document. However, I only want to push the object if an object with the same date doesn't already exist in the array. I've been e ...

How can I utilize a variable in a v-for loop as a label for a q-btn in Vue.js?

I have a list: myList = [1, 2, 3, 4, 5, 6, 7, 8, 9] I'd like to generate buttons using this list where the label corresponds to the number: <q-btn v-for="number in myList" v-bind:key="number" color="primary" label=&q ...

Next.js struggled to load an external image containing an extension within the URL

I am currently dealing with products that have images sourced from various remote servers. I am now looking to incorporate next.js images into the mix. However, after making some updates to the code, images from one server are no longer displaying properly ...

Proper method for verifying line-clamp in a Vue component

I came across a question that aligns perfectly with my current task - determining if text is truncated or not. The query can be found here: How can I check whether line-clamp is enabled?. It seems like my approach may not be accurate, so any guidance on ho ...

Utilizing AngularJS for toggling data with ng-click

In my project, I have a unique issue with a list item that toggles a modal and sets a parameter using ng-click. Strangely, when calling a specific function in another location, Course.SelectedCourse returns as undefined, even though Course.ID has a valid ...

Even though I have properly set up the express.static() function and ensured that the path is correct, my initial app is still not serving the

Just like the title suggests, I am venturing into building my first node app and have come across an issue. Everything was working perfectly yesterday. However, when I booted up my PC today, I received the error message "Resource interpreted as Stylesheet ...

What is the best way to showcase a lengthy webpage similar to that of dzone.com?

Upon visiting dzone.com, it is evident that all the posts are displayed on a single page. As we scroll down the page, older posts are dynamically added to the end of the page while posts at the beginning are potentially removed from view. I am curious abo ...

Storing the output of asynchronous promises in an array using async/await technique

I am currently working on a script to tally elements in a JSON file. However, I am encountering difficulty in saving the results of promises into an array. Below is the async function responsible for counting the elements: async function countItems(direct ...

Unleash the full potential of React and material-ui with the Raised Button feature - find out how to effortlessly keep all

This snippet showcases the code for my custom Buttons component: import React from 'react'; import RaisedButton from 'material-ui/RaisedButton'; const style = { button: { margin: 2, padding: 0, minWidth: 1, }, }; cons ...

React - Page Loads with Empty Query Parameters

Seeking assistance with navigation logic in React, I'm encountering an issue that requires some guidance. I have developed a front-end web app using TypeScript, React, and Ionic Framework V5. The app features a standard search box that redirects use ...

Rails is capable of responding to URLs with ajax crawling enabled

The google guide Explaining AJAX Applications Crawling explains how to structure your URL with a hash and ! to ensure your site is crawlable. An excellent example of this is the revamped Twitter. For instance, if you enter the URL: http://twitter.com/dini ...

Using React JS to create an interval with an API connection

Is there a way to use setInterval to make an API call once every hour? I would like to set this up in my code. componentDidMount() { fetch(fullURL) .then((response) => response.json()) .then((responseJson) => { // console.log(respons ...

"Implementing a show/hide feature for a DIV based on a selected drop-down value using vanilla JavaScript (without any external libraries

I have different tide tables for various locations, each contained within its own div. The user can select a location from a dropdown menu, and when the page loads, it displays the tide table for the first location by default. Upon changing the location, o ...

Inject props into a Component nested within a Higher-Order-Component (HOC)

In attempting to grasp the concept of creating a React Higher Order Component from this particular article, I find myself struggling to fully understand and utilize this HOC. interface PopupOnHoverPropType { hoverDisplay: string; } const WithPopupOnHov ...

I am having trouble getting Stripe Elements to function properly within Laravel

I'm currently developing a subscription app using Laravel and trying to integrate Stripe Elements, but I'm encountering issues with getting it to function properly. Below is my form: <form method="POST" action="/subscribe" id="payment-form"& ...

Guide to verifying the scope of a dynamic array in Javascript

Hey there, I'm currently trying to verify if a value falls within a specific range in a dynamic array. Let's say I have an amount of 3555, and an array of values like [1000,2000,999999]. Typically we would use conditional statements to check for ...

Not revealing the complete values of the specified column through the utilization of implode

<?php $data='{ "id": "621805046", "likes": { "data": [ { "category": "Movie", "name": "Pyaar Ka PUNCHnama", "created_time": "2013-08-13T10:11:23+0000", "id": "151480271575584" }, { ...

bespoke regulation protocol for collection of items

Is there a way to sort an array of objects based on specific rules? Unlike objects, arrays have fixed item order, so how can I rearrange them according to certain criteria? [{name: 'james', name: 'alice', name: 'sam'}] If I w ...