Comments (6)
IIRC, you can't load them back in from localStorage without using eval() to inject them into a page. I think I'd have that filed under "Dubious Practices."
from labjs.
There are other ways such as script injection. Thay said, I'm not really wild about doing our own caching. Browsers are better at it.
from labjs.
I agree with that. To some extent I'm not even sure caching is a good idea because I've already seen software break because non-cached transaction pages assumed that a new method would be available in a script and got nailed because the cached version of the script loaded. I told the team to refactor in order to apply cache-breaking on the script loads. (Unique environment, not running in a consumer browser.)
from labjs.
@getify the issue with browser caching is that sometimes the scripts are not getting cached very well and keep on getting reloaded every single time.
from labjs.
That's awfully vague. If you can talk about specific details with caching, perhaps we can identify other causes (poor caching headers, etc). But I don't think we should fix our problem of a thumbtack by pulling out a sledgehammer. :)
from labjs.
Any control you'd like to have over caching should be handled with service workers, IMO. I don't plan to build any caching behavior into the loader. It is possible eventually LABjs will ship a service worker for assistance, but that's far down the priority list, if ever.
from labjs.
Related Issues (20)
- BOM issues HOT 4
- HTTP2 or SPDY and LABjs HOT 2
- swallowing errors doesn't seem right HOT 1
- It's nearing time for 3.0 HOT 31
- LAB inserts scripts at the beginning of the <head> HOT 7
- how to use LAB when Chrome blocks inline scripts ? HOT 2
- LABjs regular expression breaks for Windows apps
- What is the role of first line?
- labjs.com is down HOT 1
- Recovering from 404 HOT 1
- Refactor out arguments.callee HOT 1
- huge longshot, but... might be a bug with LAB.js here. HOT 8
- www.labjs.com is not working
- LABjs blocking the executation of jquery each()
- setAttribute("as", "script") in chrome 51.0.2704.84 window7 messy code
- Seeking for a stable v3.0 package
- Current project status HOT 2
- [Question] Does LABjs scrub out the debugger keyword? HOT 2
- JsDelivr - I can't see '.js' files HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from labjs.