为什么deepin首页要弄个转跳?
Tofloor
poster avatar
Bluek404
deepin
2014-04-12 02:41
Author
  1.                         Deepin
  2.     redirecting to index, please wait...
  3.     正在跳转至首页,请稍等...
  4.     *type="tex*">
  5.     var lang;
  6.     if ((pos = document.cookie.indexOf('LD_LANG=')) > 0){
  7.         lang = document.cookie.substr(pos + 8, 5);
  8.         if (lang == '%23en')
  9.             window.location.href = 'index.en.html';
  10.         else
  11.             window.location.href = 'index.cn.html';
  12.     }
  13.     else if ((lang = navigator.language || navigator.browserLanguage).indexOf("zh") === 0){
  14.         document.cookie = 'LD_LANG=%23cn;path=/;domain=.linuxdeepin.com;';  
  15.         window.location.href = 'http://www.linuxdeepin.com/index.cn.html';
  16.     }
  17.     else{
  18.         document.cookie = 'LD_LANG=%23en;path=/;domain=.linuxdeepin.com;';  
  19.         window.location.href = 'http://www.linuxdeepin.com/index.en.html';
  20.     }
  21.    
Copy the Code
而且还弄两个index页面,直接用一个不更大气点么?
Reply Favorite View the author
All Replies
kiscore
deepin
2014-04-12 04:16
#1
我chrome缩略图就是“正在跳转”,丑的一笔。
Reply View the author
BingoLove
deepin
2014-04-12 06:53
#2
根据中英文切换
Reply View the author
Bluek404
deepin
2014-04-12 07:02
#3
根据中英文切换
这个知道
但是完全没必要专门弄一个网页啊
而且中英页面也可以只弄一个文件的
Reply View the author
fredy4212
deepin
2014-04-12 07:57
#4
可能技術需要在加強些啊!大部分網頁與言切換是不用跳轉的
Reply View the author