简体   繁体   English

三星智能电视如何清除应用缓存

[英]Samsung smart TV how to clear app cache

I'm developing Samsung smart SDK app. 我正在开发三星智能SDK应用程序。 When executing the app its shows previous version content. 执行该应用程序时,它会显示以前的版本内容。 (my app is running on browser and its keep displaying previous changes that i have done to the app,not the current one) After restarting the TV its shows the latest update. (我的应用程序正在浏览器上运行,并且它始终显示我对该应用程序所做的以前的更改,而不是当前的更改)。重新启动电视后,它会显示最新的更新。

This is my header. 这是我的标题。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width; initial-scale=1.0;   maximum-scale=1.0;user-scalable=no">

I did some changes to my Samsung TV App and it is working fine in my browser. 我对Samsung TV App进行了一些更改,并且在我的浏览器中工作正常。 But when comparing the defects they have mentioned (from Samsung) are not in my updated version and those are from previous submitted version. 但是,在比较它们时,他们提到的缺陷(来自三星)不在我的更新版本中,而来自先前提交的版本。 I think this should be a cache. 我认为这应该是一个缓存。 I need to ignore this and load fresh one I updated. 我需要忽略这一点并加载我更新的新内容。

In addition to the answers above you can: 除上述答案外,您还可以:

  1. Reboot TV 重新启动电视
  2. Add ?v= to the script tag for css & javascript files and change the version after every change. 将?v =添加到css和javascript文件的脚本标签中,并在每次更改后更改版本。 This process can be automated through the make system. 该过程可以通过make系统自动执行。
  3. Add no-cache headers to HTTP server, eg nginx: 向HTTP服务器添加无缓存头,例如nginx:

     location ~ .*(gif|jpg|jpeg|png|ico|css|swf|js|html|htm)$ { expires 0; } 

Try this: 尝试这个:

localStorage.clear();

OR 要么

var LocalStorageCache = caph.dal.LocalStorageCache;
var localstoragecache = new LocalStorageCache();

localstoragecache.clearAll();

See, if that helps. 看,如果有帮助。

将其放在您的html文件的头部。

<meta http-equiv="Cache-Control" content="no-store" />

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM