TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Mozilla localForage

54 pointsby slashdotaccountover 11 years ago

6 comments

mattdeboardover 11 years ago
As someone who&#x27;s put considerable effort into implementing offline utility as an afterthought for a web application, the biggest favor you can do yourself when writing a Javascript web application is to make it &quot;offline first&quot;.<p>In other words, make local storage, IndexDB, etc., the primary persistence layer. Then, at checkpoints, sync the whole MFing deal to the server (kind of like database checkpoints). From what I can tell this isn&#x27;t a concept that&#x27;s been explored by the community of dedicated front-end devs (of which I am decidedly not a member). However, I feel like it would be pretty awesome.<p>We haven&#x27;t figured it out yet and have essentially thrown in the towel, settling for an ad hoc, informally-specified, bug-ridden, slow implementation of half of a &quot;real&quot; database in the name of &quot;getting offline to work&quot;.<p>edit: If someone reading this eventually does get this figured out, and easy, please for the love of god let me know. My email address is in my profile.
评论 #7245945 未加载
评论 #7246424 未加载
akerl_over 11 years ago
Previous discussion on this topic: <a href="https://news.ycombinator.com/item?id=7224225" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=7224225</a><p>As a backend dev who occasionally has to write some frontend stuff, this looks intriguing to me. Anything that lets me think less about the zoo that is the varied state of browser implementations is great.
DTrejoover 11 years ago
<a href="http://offlinefirst.org/" rel="nofollow">http:&#x2F;&#x2F;offlinefirst.org&#x2F;</a>
streptomycinover 11 years ago
Previous discussion: <a href="https://news.ycombinator.com/item?id=7224225" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=7224225</a>
pixelcortover 11 years ago
I think the bigger issue with offline storage is how complicated it is to do cross platform indices. FFx only supports IndexedDB and Safari only SQL. There are abstraction layers, but they&#x27;re also a bit difficult to get working correctly.<p>K&#x2F;V storage is nice, but once you have more than a few thousand objects that you want to index, it&#x27;s a little bit painful.
dudusover 11 years ago
Can someone explain to me why localStorage doesn&#x27;t do async?