作者LPH66 (f0VMRgEBA)
看板Web_Design
标题Re: [问题] 现在的ISP还有在用proxy吗?
时间Fri Nov 22 11:47:15 2013
※ 引述《ppppk (ppppk)》之铭言:
: 网路架构的书上说 proxy 代理伺服器有很多好处
: 尤其是对ISP 可以省掉很多资源
: 但小弟的网站资料和时间有相关性 不希望内容被proxy
: 不知道现在的ISP还有用proxy吗?
你的问题应该是 cache 问题
其实不只 proxy 会有 cache 问题而已
不过对於这种问题最简单的方法是在网站里的连结的网址上
用 javascript 加一个 GET 参数 (就是附在 ? 後面的东西)
内容可以是当下时间(new Date().getTime())或随机乱数(Math.random())
这样对於 cache 来说 这个参数每次都不一样 会视为不同的网址
就能保证每次都能取到最新的内容了
--
'Oh, Harry, don't you
see?' Hermione breathed. 'If she could have done
one thing to make
absolutely sure that every single person in this school
will read your interview, it was
banning it!'
---'Harry Potter and the order of the phoenix', P513
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 210.69.49.38