Comments (4)
Hello Stan! Thanks for collaborating filling this issue :)
How are you using senna
App? You are extending senna
App?
from senna.js.
Thanks for the quick response!
Currently using it with turbolinks. Just adding senna-surface etc. as tags. It works perfectly! But my pages must be up to date always (for example I have a page with a schedule that can be updated any time).
Thanks in advance for helping!
EDIT:
Found app.clearScreensCache();
is something. Not sure how to implement this in my situation.
Because I want to clear cache on every page navigation. (So basically I never want to cache any page).
Couldn't find an easy option to turn it off.
Let me know if this is possible!
EDIT 2:
I've found that if you edit a value in senna-debug.js on line 8683 to false. It would not cache any pages.
_this.cacheable = false;
Not sure if this is the best option? Since now Senna is creating new screens for every page navigation, in stead of deleting the old screen and creating a new one.
Let me know if there is an auto-delete screen if cache does not match up to date page (cache invalidation)
from senna.js.
Hi @Aurugorn,
I had the same problem as you.
You can have a bit more control of your cache like this:
import App, {HtmlScreen} from "senna";
var appInstance = new App();
appInstance.setLinkSelector("a.js-spa");
appInstance.setFormSelector("");
appInstance.addSurfaces('page-body');
appInstance.addRoutes([{
path: /.*/,
handler: function (route) {
const screen = new HtmlScreen();
screen.setCacheable(false);
return screen;
}
}]);
from senna.js.
Closing based on the provided workaround. Please, feel free to reopen if still need something else!
from senna.js.
Related Issues (20)
- Senna does not correctly evaluate favicon when page changes
- endNavigate when instantiated via data attributes HOT 3
- Senna.js not working when navigating between pages when using a Web Server + SSL on IE11 HOT 2
- Browser support matrix doesn't mention support for any browser other than Edge in Windows 10 HOT 14
- Query appending to IE11 link
- Page keyword metatag is not being refreshed after page navigation HOT 2
- how to use asp.net mvc scene? HOT 1
- In IE11, media queries in style tags with data-senna-track attributes are applied as though the page has a width of 0px HOT 14
- Add custom behavior when a Redirect happens (302) HOT 4
- Senna moves focus away from autoFocus fields on refresh HOT 3
- Start navigation on mousedown instead of on click HOT 2
- Redirect Path passed to the historyState don't support hashes
- Back button reloads the inital page HOT 1
- How to flip a specific surface only? HOT 1
- Dynamically added classes to the head element gets removed on page change HOT 1
- Branch 3.x and move 2.x to master
- Cleanup long-standing PRs HOT 3
- Mio de mi HOT 1
- Saving app.screens into localStorage HOT 1
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 senna.js.