我正在尝试创建一个迷你应用程序(在Salesforce中,尽管这可能与此无关),它将来自PDF.js的开箱即用的PDF.js嵌入到iframe中。用户从列表中选择一个PDF,应用程序检索该PDF的base64并将其传递给查看器。
有一些使用过时版本的的工作示例,包括和。这些工作实例所做的似乎是:
在iframe中的和向查看者传递base64的
在viewer.html中,添加了以下脚本来接收和处理消息事件:
<script>
if (window.addEventListener) {
// For standards-compliant web b
我的网站从另一个网站加载iframe。我想缓存这个iframe,然后加载一个缓存副本。
不幸的是,我不能使用nginx,这就是为什么我对如何使用php / js / ajax / xml或其他方式缓存iframe感兴趣。
可能是这样的:
- create iframe.php file on server with loading another site iframe
- iframe.php load iframe first time, than cache it
- include iframe.php where I need (but I don't
underst
从哪里开始处理这个jQuery错误呢?未捕获的TypeError:无法读取未定义的属性“”indexOf“”
错误:
:formatted:55 Uncaught TypeError: Cannot read property 'indexOf' of undefined
at n (:formatted:55)
at :formatted:125
at dispatch (??/wp-includes/js/jquery/jquery.js,/wp-content/js/postmessage.js?m=1377267974j:3)
at r.
我有一个大型网站,它使用Drupal核心的匿名用户的页面缓存。我做了一些需要部署的javascript更改。由于页面当前是缓存的,所以我需要清除页面缓存。
我想知道是否有一种只清除页面缓存的方法?如果可能的话,我不想重建任何其他缓存(例如菜单)。
我知道Drush在缓存方面提供了一定程度的粒度;然而,Drush似乎不能只清除页面缓存。
$ drush cc
Enter a number to choose which cache to clear.
[0] : Cancel
[1] : all
[2] : drush