Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I'm making a website for a client that will mostly be used offline through a wifi router. But there will also be an online version available. The purpose of this is to distribute files in parts of the world where infrastructure is not suitable for internet access. For those who do have internet access in some of these parts, the internet probably isn't very fast or reliable.
Some of the pages I've made can be accessed simply by using JS functions to hide one page and show another, instead of anchoring to another file. I figured this method might load content quicker, rather than linking to multiple pages. But is that true? Or should I just put all the content on separate pages?
Yes, that's true, but most browsers doesn't load a page if they don't get an answer, so you'll need at least one local server. You can store almost everything (style, script and content) in localstorage, store as strings and eval if/when needed. Also, if local processing isn't a problem you can use AngularJS to build and rebuild the page.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I am building a react website, and It has multiple localizations. What is the best practice to store ui texts for different languages? I am currently considering the two
Store text in ui code, as an object variable or array, for multiple languages This way, I am fearing it could scatter the text in many files and could make the the site load slow since all the text is included with the code
Storing in a static JSON file in a server directory This way I am fearing with many components requesting their texts, it would appear bad with text loading slowly on every page. I might make it fetch all once for all component, but that would seriously hinder the modularity.
What is the best practice to implement text storage for multiple localization react app?
First, you need to use npm packages i18next react-i18next
Here is good tutorial how to do it
https://www.mindbowser.com/adding-multi-language-support-using-reactjs/
You should save as local Json, no need for static translation to be served from server.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I am implementing a web application which uses React as front end and Asp.net as backend. I have around 2000 images that has to be used in the web application. What will be best way to store these images ?
The best way is never store any media yourself.
Since serving any image/video content relies heavily on your network/bandwidth, it is not always stable and vulnerable to the slightest DDoS attack. Let alone that the security of your server may not be enough to protect your data.
I would highly recommend you to lookup some CDN, or Content Delivery Network, provider, such as AWS and GCD. You may also set up access right and serve criteria to better protect your data in these providers.
Reference:Why Use CDN’s for Your Website & Image Hosting
Edit: I just noticed that you have tagged your question with azure-storage, which is also a great option for serving media over the internet.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
So I recently stumbled upon jscrambler.com
This tool actually allows you to protect your javascript code, its fascinating. However, the service is cloud based and im wondering if this is really ok. Since im actually posting code on their servers. While others cant steal my code, it is still vurnerable to theft from within the the guys behind jscrambler.
Maybe im worrying too much. Is it safe to use jscrambler services?
You're right. Giving your code to a 3rd party to protect it is as counter-productive as it is counter-intuitive.
That said, browser users always have access to the underlying Javascript code. The most you can do is wrangle the source code by making syntactic changes that produce the same functionality but result in harder-to-read text.
This process is known as uglification or minification (since it reduces file size). UglifyJS is the most frequently used tool for this.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
What are the pros and cons of different methods of including data from a database on your webpage?
From my understanding I have two options. A html page, with JavaScript (or other browser language) that fetches and includes data. A php script (or other server based program) that builds and outputs an html page with the data already included. But how am I to made the decision between the two?
Always go for PHP when using a database. It is a more robust and proven technique.
Also PHP pages are protected by the server and nobody can see how the code works, they only see HTML output, whereas with Javascript anyone can see your code.
After all I don't know how JS supposed to interact with data, maybe store data in an XML page and then retrieve them, not sure. Why invent a wheel when you have PHP which is supposed to work with databases unlike JS which is designed mostly to be an improved front end functionality, unless its back end JS, but few people use JS that way.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Pls help me.. I want to send a data from a variable form one html file to another. with out using internet.. the html file will be run in a android webVIew. thank you No PHP pls
It's not possible. but you can use url params file2.html?key=value&anotherKey=value
It’s not possible to share data between files, since dead files are by no means applications capable of handling data. It takes a browsing context to make them alive.
If you can’t use any underlying code to pass the data between documents, then your best shot is to pass the data between browsing contexts (inside a single webView those would be frames I guess.)