Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有什么方法可以让 div 或 iframe 在页面刷新时不重新加载?
把它放在你的 iframe 中以避免缓存:
<head> <meta http-Equiv="Cache-Control" Content="no-cache"> <meta http-Equiv="Pragma" Content="no-cache"> <meta http-Equiv="Expires" Content="0"> </head>
正常的场景是可刷新的部分应该在 div/iframe 中。您应该遵循这一点,您无法尝试做什么...