upup:每个域可以提供多个页面吗? [英] upup: Can I supply more than one page per domain?

查看:108
本文介绍了upup:每个域可以提供多个页面吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 upup 使离线内容可用.我想为一个域提供多个页面:

I'm using upup to make offline content available. I'd like to supply several pages for a single domain:

  • page1.php包含一个upup.js代码段,以使page1_off.php在离线状态下可用.
  • page2.php包含一个upup.js代码段,以使离线时page2_off.php可用.

这是可行的,但是尝试在页面之间导航时出现错误.这是发生了什么:

This is working, but I get an error when trying to navigate between pages. This is what happens:

  • 当我在第1页上没有互联网连接时,然后导航到第2页,我仍然看到第1页的内容.
  • 当我在没有互联网连接的第2页上时,然后导航到第1页,我仍然看到第2页的内容.

当我进入example.com时,然后脱机,然后尝试打开任何页面,就没有问题.

When I'm on example.com, then go offline, then try to open any of the pages, there's no problem.

我该如何进行这项工作?

示例JavaScript:

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>

感谢
Pida

Thanks
Pida

推荐答案

每个域似乎upup目前不支持多个页面. Github 上有一个问题,名为允许为网站​​的不同区域存储不同的内容".

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".

这篇关于upup:每个域可以提供多个页面吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆