Category Archives: WWW

換回 Firefox…

Tweet 用 Google Chrome 用一陣子了,回頭來看看 Firefox 發展的如何… 在 Location bar 輸入網址還是鈍鈍的問題還是沒解,不過很明顯感覺速度跟 Chrome 差不多了… 裝了一卡車套件,用一陣子看看吧 :o

Posted in Browser, Computer, Firefox, GoogleChrome, Murmuring, Network, Software, WWW | Tagged , , | Leave a comment

Google Chrome Extension 內攔截所有的 url request…

Tweet 之前寫了一個處理 Referer header 的 extension,使用 chrome.experimental.webRequest.onBeforeSendHeaders.addListener 攔截所有的 url 然後處理 Referer header。 之前只需要在 manifest.json 裡面加上 experimental 就可以使用,但是前陣子發現失效。剛剛在「onBeforeSendHeaders listeners aren’t triggering」這個 issue 裡面找到解法:現在需要多加上 <all_urls> 這組權限。

Posted in Browser, Computer, GoogleChrome, Murmuring, Network, Programming, Software, WWW | Tagged , , , | Leave a comment

The Pirate Bay (海盜灣) 從 Torrent 檔下載換成 Magnet URI (磁力連結)

Tweet The Pirate Bay 將把 torrent 檔下載方式換成磁力連結:「The Pirate Bay Will Stop Serving Torrents」。 Magnet URI 下載 BitTorrent 檔案其實只是多了一個抓 torrent 檔的步驟:首先先從 Magnet URI 內取得 SHA1 值,然後透過 DHT 抓到 torrent 檔的 metadata,然後後面就可以照舊進行… 至於 DHT 的初次建立,除了可以透過中央式的 router.utorrent.com 取得外,也可以透過其他 torrent 檔案下載所提供的 tracker 找到節點。在取得一批節點後,透過 PEX … Continue reading

Posted in Computer, Murmuring, Network, P2P, WWW | Tagged , , , , , , | 1 Comment

Akamai 買下 Cotendo…

Tweet Akaiami 的新聞稿先出來了:「December 22, 2011 – Akamai to Acquire Cotendo」,Cotendo 的只有在 Twitter 上看到官方帳號提到 Akamai 的新聞稿。 併購的金額在: Under terms of the agreement, Akamai will acquire all of the outstanding equity of Cotendo in exchange for a net cash payment of approximately … Continue reading

Posted in CDN, Computer, Murmuring, Network, WWW | Tagged , , | Leave a comment

YouTube (Google) 允許環球唱片 (Universal Music Group,UMG) 直接移除非 UMG 所擁有版權的影片

Tweet 依照環球唱片 (Universal Music Group,UMG) 提供給法院的文件中,YouTube (也就是 Google) 允許 UMG 透過 YouTube 的 CMS (Content Management System) 移除「不屬於 UMG 的影片」:「Google Deal Allegedly Lets UMG Wipe YouTube Videos It Doesn’t Own」,文件 (PDF) 在:「gov.uscourts.cand.248875.14.0.pdf」這邊可以下載取得。 重點在於這份文件中第四頁的這段: The UMG-YouTube agreement grants UMG rights to … Continue reading

Posted in Computer, Movie, Murmuring, Network, Recreation, Television, WWW | Tagged , , , , , , , | Leave a comment

同時用 mod_deflate 與 mod_fastcgi 所產生的問題…

Tweet 今天花了不少時間找到的問題… 問題是使用 mod_fastcgi 以及 mod_deflate 時,Content-Encoding 會是 gzip,但 Content-Length 會是未壓縮的長度。 也就是說,伺服器端在 header 提供的 Content-Length 可能寫 8KB,但實際上只丟出 2KB (壓縮後的大小),於是瀏覽器讀完這 2KB 後會停下來一直等,等到 Keep-Alive timeout 斷線 (在我機器上預設是 5 秒)。 在 timeout 斷線後 browser 會就抓到的資料直接解開執行 (因為這 2KB 都有抓到,於是都正確執行)。如果用瀏覽器這邊的 debugger 觀察,就會發現從 first byte 後 … Continue reading

Posted in Computer, Murmuring, Network, Software, WWW | Tagged , , , , , , , | Leave a comment

Squid 3.1 的 forward proxy 設定…

Tweet 因為打算給 portsnap 用,所以得用 Squid 3.1 架 forward proxy,可以避免大量對外抓同樣的資料… 由於是內部的機器,不需要擋 acl,設定起來超簡單… ports 裝完 www/squid31 後,把 squid.conf 寫成: # http_access allow all # access_log /home/squid/logs/access.log squid cache_dir aufs /home/squid/cache1 1024 16 16 cache_effective_group squid cache_effective_user squid cache_log /home/squid/logs/cache.log cache_mem 256 MB … Continue reading

Posted in Computer, Murmuring, Network, Software, WWW | Tagged , , | 2 Comments

Firefox 11 將會支援 SPDY Protocol

Tweet Firefox 預定在 11 (現在是 8) 支援 SPDY Protocol:「(SPDY) Implement SPDY protocol」,除了 Google Chrome 自家瀏覽器支援外,總算有個大的也要支援了… 所以現在除了 Chrome、Kindle Fire 以外,又多了 Firefox 支援… 不過 Apache 與 F5 什麼時候會支援呢… mod-spdy 看起來… 呃…

Posted in Browser, Computer, Firefox, Murmuring, Network, Security, Software, WWW | Tagged , , , , , , , , | Leave a comment

安裝 Pretty Beautiful Javascript…

Tweet Pretty Beautiful Javascript,這是安裝前看 jQuery 1.7.0 程式碼的效果: 這是安裝後的效果: 不過 javascript 檔案大一點跑起來就會很慢 XD

Posted in Browser, Computer, GoogleChrome, Murmuring, Network, Programming, Software, WWW | Tagged , , , | 2 Comments

改用 jquery-ujs…

Tweet 昨天聽 othree 提到 jquery-ujs (Unobtrusive scripting adapter for jQuery),裡面有不少 convention 可以直接套用。othree 在三月有寫一篇文章介紹:「jQuery-ujs」。 雖然 repository 看起來是給 RoR 使用,但直接把 rails.js 抓下來用「<script src=”rails.js”></script>」掛上來,還是可以用在非 RoR 環境裡。 直接看 code 也很好懂,舉幾個例子來說: <?php $sToken = hash(‘sha256′, session_id()); ?> <meta name=”csrf-token” content=”<?php echo $sToken; ?>”> <meta name=”csrf-param” … Continue reading

Posted in Computer, Murmuring, Network, Programming, Software, WWW | Tagged , , | 1 Comment