简体   繁体   English

如何创建离线工作的网络应用程序? (例如,bulkresizephoto)

[英]How to create a web app work offline? (ex. bulkresizephoto)

I have to create an app that is pretty much standalone - kind of?我必须创建一个几乎独立的应用程序 - 怎么样? My goal is to create a web based app that people can access through web browser.我的目标是创建一个人们可以通过网络浏览器访问的基于网络的应用程序。 The user should be able to open a file from their machine (IOS, Windows, Android etc..) without uploading to a server, everything should run from within the device.用户应该能够在不上传到服务器的情况下从他们的机器(IOS、Windows、Android 等)打开文件,一切都应该在设备内运行。 The app then extracts some data by parsing the content.然后应用程序通过解析内容来提取一些数据。 In this example i am using MSGREADER (wl-msg-reader).在这个例子中,我使用的是 MSGREADER (wl-msg-reader)。

I can make it work if i create an API with js and express and html.如果我用 js 和 express 和 html 创建一个 API,我可以让它工作。 However that requires uploading a file, or does it..??但是,这需要上传文件,还是...??

A while ago i remember using a site that had similar functionality and since then i've always wanted to know how they do it?不久前我记得使用一个具有类似功能的网站,从那时起我一直想知道他们是如何做到的? (see https://bulkresizephotos.com/en ), this open the possibility of creating many types of apps that can work "offline". (请参阅https://bulkresizephotos.com/en ),这开启了创建可以“离线”工作的多种类型应用程序的可能性。 In the future i want to be able to create an electron app that is also stand alone, meaning, no external server connection should be required, but that's another question for another time.将来我希望能够创建一个也是独立的电子应用程序,这意味着不需要外部服务器连接,但这是另一个问题。

Can anyone shine some light into this question?任何人都可以对这个问题有所了解吗?

I am known to sometimes not being super clear on my questions, if you need me to provide more info, let me know.众所周知,我有时对我的问题不是很清楚,如果您需要我提供更多信息,请告诉我。

I can make it work if i create an API with js and express and html.如果我用 js 和 express 和 html 创建一个 API,我可以让它工作。 However that requires uploading a file, or does it..??但是,这需要上传文件,还是...??

Yes, it does require that you have an internet connection and that you upload the file.是的,它确实需要您有互联网连接并上传文件。 The only way that these apps can work offline has to abide with the following:这些应用程序可以离线工作的唯一方法必须遵守以下几点:

  1. That the website was cached during a previous load when you had a connection.当您建立连接时,该网站是在上次加载期间缓存的。 (assuming that you want to actually access the site w/oa connection) (假设您想实际访问该站点而无需 OA 连接)
  2. All the work is done client-side with no server interaction whatsoever (in JavaScript/WASM), which is entirely possible and could be decently fast with modern devices and optimization.所有的工作都是在客户端完成的,没有任何服务器交互(在 JavaScript/WASM 中),这是完全可能的,并且可以通过现代设备和优化来相当快。

There's no going around it, that's just the way internet works.没有办法绕过它,这就是互联网的工作方式。 A huge cluster of interconnected servers and client devices which communicate through a system of networks and corresponding hardware infrastructure.一个巨大的互连服务器和客户端设备集群,它们通过网络系统和相应的硬件基础设施进行通信。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 javascript 创建离线 Web 应用程序 - how to create an offline web app using javascript 如何滚动大表面? (例如文章) - How to scroll a big surface ? (ex. an article) 渐进式 Web 应用程序“无法脱机工作”错误 - Progressive Web App "does not work offline" error 如何在 function 中添加一个点(例如: lib.genarate() ) - How to put a dot in a function (ex.: lib.genarate() ) 如何离线和在线工作 Web 应用程序(在 .NET 中) - How to work web application in offline and online (in .NET) 渐进式Web App-页面无法离线运行错误 - Progressive Web App - Page does not work offline error 如何使用JavaScript生成这种格式的电子邮件提示/提示(例如j*****e@example.com) - How to generate an email clue/hint in this format (ex. j*****e@example.com) using javascript 如何格式化日期从单词到数字? 防爆。 2004年11月4日到2004年4月11日使用JQuery? - How to format date from word to number? Ex. Nov 4, 2004 to 11/04/2004 using JQuery? 如何基于哈希表替换对象值(例如,“州”:“ CO”更改为“州”:“科罗拉多”) - How to replace object value based on hash table (ex. “State”: “CO” changes to “State”: “Colorado”) 如何在离线模式下将 web 应用程序转换为没有“url”的 android 应用程序? - How to convert a web app to android app without 'url' in offline mode?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM