Re: [問題] 現在的ISP還有在用proxy嗎?
※ 引述《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
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):