upup: Can I supply more than one page per domain?

会有一股神秘感。 提交于 2019-12-25 16:51:26

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!