首頁 美術繪圖 | 美術設計 | 熱門標籤 | 首選 | 首頁宣傳 | 近期作品 論壇: 發表 | 美術工作 | 美術比賽 | 展覽活動 | 美術相關 | 一般討論 | 美術同好 CG 討論 :: Photoshop | Painter | 3D 行動 | AMP

【 立即註冊 】 : 更改個人資料 : : 登入

會員名稱: 登入密碼: 保持登入

Chrome "undefined" appended URL causes 404 Not Found

發表新主題 回覆主題 討論區 Windows, Linux, Perl, PHP, C/C++, Driver, Web 理論、應用、硬體、軟體

| 1頁, 共1
人氣點閱:3046 發表人
Chrome "undefined" appended URL causes 404 Not Found 2012-10-28 20:50
/ / /

Random "undefined" appended URL causes 404 Not Found @ Chrome



有發現一些怪現象,尤其是這個 Chrome 18 or Chrome 22 這個瀏覽器
會導致約有 0.08% 的機率,隨機的要求 "undefined" 這個物件,
但是明明網站沒有任何 undefined 的物件。


Guess: 猜測是 Windows Chrome 22 版本的 BUG?

User-Agent:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4



171 / 212627 = 0.08%



代碼:

$ wc  access.log
    212627  3844687 53484813

$ grep -r "undefined HTTP" access.log | wc
    171    3097   37608

$ grep -r "undefined HTTP" access.log | grep Safari | wc
    169    3047   37099

$ grep -r "undefined HTTP" access.log | grep 'Safari/537' | wc
    168    3028   36855

$ grep -r "undefined HTTP" access.log | grep 'Safari/537' | grep -i 'Chrome' | wc
    169    3046   37079




上述實際 access.log 測試結果。
________________

美術插畫設計案子報價系統 v0.1 Beta
爪哇禾雀
Type



繪圖畫廊設計藝廊
攝影相簿留言板
最愛收藏分類標籤
暱稱: Type
註冊: 2002-11-30
發表: 11085
來自: vovo2000.com
V幣: 900977
Re: Chrome "undefined" appended URL causes 404 Not Found 2012-10-31 12:24
/ / /

IE 好像也會造成 Undefined,Chrome 佔多數



發生的機率非常低,使用者應該也沒感覺(因為這是 Server 端記錄到的)
不確定誰造成的
Google Plus +1 Button Javascript
- Google Adsense Javascript
- Google Analytics Javascript
- Facebook Like-Button Javascript

代碼:

$ grep "undefined" access.log.1 | wc
     76    1407   17419

$  grep "undefined" access.log.1 | grep Chrome | wc
     67    1223   15192

$  grep "undefined" access.log.1 | grep IE | wc
      9     184    2227

$  grep "undefined" access.log.1 | grep Firefox | wc
      0       0       0


________________

美術插畫設計案子報價系統 v0.1 Beta
爪哇禾雀
Type



繪圖畫廊設計藝廊
攝影相簿留言板
最愛收藏分類標籤
暱稱: Type
註冊: 2002-11-30
發表: 11085
來自: vovo2000.com
V幣: 900977
Re: Chrome "undefined" appended URL causes 404 Not Found 2012-11-30 13:47
/ / /

The "random /undefined 404" symptom still exists there



Seemingly most of them are __STILL__ "Google Chrome 23" clients.

If you already prepare some customzied HTTP-404-Not-Found handle script,
you may want to add some early-exit to save your CPU%.

your-404-not-found.php
代碼:

<?PHP

# ... SNIP ... your code

$undef_str = substr($_SERVER['REQUEST_URI'], -10, 10);

if ($undef_str == '/undefined')
{
    echo 'https://vovo2000.com';
    exit;
}

# ... SNIP ... your code

?>

Type



繪圖畫廊設計藝廊
攝影相簿留言板
最愛收藏分類標籤
暱稱: Type
註冊: 2002-11-30
發表: 11085
來自: vovo2000.com
V幣: 900977





資訊相關理論、技術、管理、應用、產品等
發表新主題 回覆主題