我有这个按钮刷新页面onclick刷新但不是从缓存?
echo '<input type="button" value="Reload Page"
onClick="window.location.href = window.location.pathname;">';
是什么,以确保该页面不会从缓存中读取的最简单的方法?要使用Math.random()
喜欢的东西
echo '<input type="button" value="Reload Page"
onClick="window.location.href = window.location.pathname&\'?t=\'&Math.random();">';
+1这是最好的方法。 – alex 2011-03-17 01:07:57
如果我用这个,我得到'404 - 不Found' – Radek 2011-03-17 03:47:46
,这在错误日志'(connections.c.1710)SSL(错误):5-1 32残破pipe' – Radek 2011-03-17 04:03:22