无法清除临时存储 [英] Failed to clear temp storage

查看:885
本文介绍了无法清除临时存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无法清除临时存储:已确定某些文件对于Web应用程序内的访问是不安全的,或者正在对文件资源进行过多调用. SecurityError

Failed to clear temp storage: It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources. SecurityError

我在控制台中收到此错误.我有一个脚本名称script.js,该脚本进行ajax调用以从php检索数据.

I'm getting this error in console. I have a script name script.js which makes ajax calls to retrieve data from php.

知道为什么吗?

这是我的jQuery脚本

Here's my jQuery script

$(document).ready(function() {

  var loading = false;
  var docHeight = $(window).height();

  $('.timeline').css({minHeight: docHeight});

  function get_tl_post() {

    if (loading==false) {

      loading = true;

      $.ajax({
        type:"POST",
        url:"timeline.php",
        data:"data=instagram",
        beforeSend:function(){
           $('.loader').fadeIn("slow");
        },
        complete:function(){
          loading = false;
          $('.loader').fadeOut("slow");
        },
        success:function(data) {
          if(data=="error")
          {
            get_tl_post();
          }
          $(data).hide().appendTo(".timeline").fadeIn(1000); 
        }
      });
    }
  }

  $(window).scroll(function(){
    if ($(window).scrollTop() == $(document).height() - $(window).height()) {
      get_tl_post();
    }
  });
});

推荐答案

这是由于资源的网络映射所致.

换句话说,您可能在chrome开发工具中添加了工作区文件夹. 现在,当您尝试对某些文件进行更改时,它会向文件系统发出请求.暂时可以正常工作.但是,在某些情况下,您将删除网络映射.

This is Due to Network Mapping of your resources.

In other words, you might have added workspace folder in your chrome dev tools. Now when you are trying to make changes in some files it makes the Request to the File-System. This works fine for a while. However in some scenarios you remove your network mapping.

然后,当您尝试在浏览器中打开该网页时,它可能会或可能不会要求重新映射网络资源,并且仍然尝试更新文件系统. 那就是您收到此错误的时间. 您的脚本没有错.

Then when you trying to open that web page on the browser, it might or might not ask for remapping of network resources and still try to update the File System. And that's when you get this error. There is nothing wrong with your script.

现在唯一的解决方法是删除高速缓存,然后重新启动System. 如果问题仍然存在,则只需重新安装chrome,即可解决此问题.

Now the only solution to this could be Removing cache, then restarting System. If the problem still persist, you can simply re install chrome and this should be fixed.

此外,有时网络映射也可能导致其他一些问题. 例如,使CSS文件大小达到75MB或更高.因此,在使用网络映射时必须采取预防措施.

Moreover, sometimes network mapping can cause several other issues as well. For example, making the CSS file size to whooping 75MB or above. So you have to take precautions when playing with network mapping.

(可选)如果您使用的是Mac ...甚至是Windows,并且具有sh 可用的命令.

Optionally if you are on Mac... or Even on Windows and have sh commands available.

sudo find / -type f -size +50000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

在您的终端中单击它,以找出超过50MB的罪魁祸首个人文件.然后可以将其删除.

Hit this in your Terminal to find out the culprit individual file which is over 50MB. you could then remove them.

注意:以上命令的作用是,它将找到大于50MB的所有单个文件,并一一打印在您的终端上.

Note : What the above command does it, it will find all the individual files which are more than 50MB and print them on your terminal one by one.

这篇关于无法清除临时存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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