问题
I'm using upup to make offline content available. I'd like to supply several pages for a single domain:
- page1.php contains an upup.js code snippet to make page1_off.php available when offline.
- page2.php contains an upup.js code snippet to make page2_off.php available when offline.
- etc.
This is working, but I get an error when trying to navigate between pages. This is what happens:
- When I'm on page1 without internet connection, then navigate to page2, I still see the contents of page1.
- When I'm on page2 without internet connection, then navigate to page1, I still see the contents of page2.
When I'm on example.com, then go offline, then try to open any of the pages, there's no problem.
How can I make this work?
Sample JavaScript:
UpUp.start({
"content-url": "/offlinedata/page1_off.php",
});
Also, should it be possible to list pages as assets? For me, this is not working:
<script>
UpUp.start({
'content-url': 'offline.html',
'assets': ['page1_off.php', 'page2_off.php']
});
</script>
Thanks
Pida
回答1:
It appears that upup doesn't support more than one page per domain yet. There's an issue on Github named "Allow storing different content for different areas of the site".
来源:https://stackoverflow.com/questions/33774551/upup-can-i-supply-more-than-one-page-per-domain