admin管理员组文章数量:1323722
I'm developing Samsung smart SDK app. 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" ".dtd">
<html xmlns="">
<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. But when paring 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.
I'm developing Samsung smart SDK app. 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/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3/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. But when paring 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.
Share Improve this question edited Jul 23, 2015 at 5:41 san88 asked Jul 23, 2015 at 5:05 san88san88 1,3845 gold badges38 silver badges62 bronze badges 2- 1 quick solution - cache control either in the <meta> tags in the HTML page, or through headers on your http server. Without seeing ANYTHING of your code/markup, that's the most I'll say – Jaromanda X Commented Jul 23, 2015 at 5:07
- what you describe (double reload for new code) is pletely normal and expected behavior using manifests. look into the appcache events, but honestly, it shouldn't be a problem in production if you don't push busted stuff. – dandavis Commented Jul 23, 2015 at 5:08
3 Answers
Reset to default 2In addition to the answers above you can:
- Reboot TV
- Add ?v= to the script tag for css & javascript files and change the version after every change. This process can be automated through the make system.
Add no-cache headers to HTTP server, e.g. 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.
Put this in head of your html file.
<meta http-equiv="Cache-Control" content="no-store" />
本文标签: javascriptSamsung smart TV how to clear app cacheStack Overflow
版权声明:本文标题:javascript - Samsung smart TV how to clear app cache - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742120338a2421665.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论