UWInfo Blog
發表新文章
[Join] | [忘記密碼] | [Login]
搜尋

搜尋意見
文章分類-Bike
[所有文章分類]
  • ASP.NET (10)
  • ASP.NET2.0 (6)
  • ASP.NET4.0 (7)
  • JavaScript (11)
  • jQuery (9)
  • FireFox (0)
  • UW系統設定 (0)
  • SQL (10)
  • SQL 2008 (7)
  • mirror (0)
  • SVN (2)
  • IE (2)
  • IIS (9)
  • IIS6 (0)
  • 閒聊 (0)
  • W3C (0)
  • 作業系統 (1)
  • C# (0)
  • CSS (3)
  • FileServer (0)
  • HTML 5 (3)
  • CKEditor (2)
  • UW.dll (3)
  • Visual Studio (4)
  • Browser (2)
  • SEO (1)
  • Google Apps (0)
  • 網站輔助系統 (0)
  • DNS (0)
  • SMTP (1)
  • 網管 (1)
  • 社群API (0)
  • SSL (0)
  • App_Inventor (0)
  • URLRewrite (0)
  • 開發工具 (0)
  • JSON (0)
  • Excel2007 (0)
  • 試題 (3)
  • LINQ (0)
  • bootstrap (0)
  • Vue (0)
  • IIS7 (0)
  • foodpanda (0)
  • 編碼 (0)
  • 資安 (0)
  • Sourcetree (0)
  • MAUI (1)
  • CMD (0)
  • my sql (0)
所有文章分類
[Bike的分類]
  • ASP.NET (48)
  • ASP.NET2.0 (15)
  • ASP.NET4.0 (34)
  • JavaScript (49)
  • jQuery (26)
  • FireFox (4)
  • UW系統設定 (3)
  • SQL (39)
  • SQL 2008 (25)
  • mirror (4)
  • SVN (4)
  • IE (9)
  • IIS (20)
  • IIS6 (1)
  • 閒聊 (7)
  • W3C (6)
  • 作業系統 (9)
  • C# (24)
  • CSS (12)
  • FileServer (1)
  • HTML 5 (11)
  • CKEditor (3)
  • UW.dll (13)
  • Visual Studio (16)
  • Browser (8)
  • SEO (1)
  • Google Apps (3)
  • 網站輔助系統 (4)
  • DNS (5)
  • SMTP (4)
  • 網管 (11)
  • 社群API (3)
  • SSL (4)
  • App_Inventor (1)
  • URLRewrite (2)
  • 開發工具 (6)
  • JSON (1)
  • Excel2007 (1)
  • 試題 (3)
  • LINQ (1)
  • bootstrap (0)
  • Vue (3)
  • IIS7 (3)
  • foodpanda (2)
  • 編碼 (2)
  • 資安 (3)
  • Sourcetree (1)
  • MAUI (1)
  • CMD (1)
  • my sql (1)
最新回應
  • Newtonsoft.Json.JsonConvert.DeserializeObject 失敗的情況
    test...more
  • 用 Javascript 跨網頁讀取 cookie (Cookie cross page, path of cookie)
    ...more
  • IIS 配合 AD (Active Directory) 認証, 使用 .Net 6.0
    太感謝你了~~~你救了我被windows 認證卡了好幾天QQ...more
  • PostgreSQL 的 monitor trigger
    FOR EACH ROW 可能要改為 FOR EACH STATEMENT ...more
  • 用 Javascript 跨網頁讀取 cookie (Cookie cross page, path of cookie)
    ;;;;...more
  • 匯出 let's encryption的憑証
    1. win-acme 選擇 A: Manage renewals找到你要轉移的憑證名稱和密碼2. ...more
  • 資安問題 -- 存入 DB 後顯示內容
    伺服器隱碼問題1 寫入DB前不是當成字串就執行某些事情 (某些server 漏洞? 許功蓋?)2 寫...more
  • 匯出 let's encryption的憑証
    【注意】要打開 win-acme <<這個軟體匯出憑證...more
  • Swagger 的問題解決 (NSwag)
    DefaultController所產出的文建會讓Swagger讀不懂報錯[ApiExplorerS...more
  • 合併兩個 Expression -- Combining two expressions (Expression>)
    官方文件就有寫啊,這麼多方法不全部看個一遍說不過去吧~https://learn.microsoft...more
標籤
  • google
  • json
  • SQL Connec
  • 44
  • 310
  • -6044
  • ti
  • 200
  • web.config
  • svnadmin
  • 856
  • uwinfo
  • 814
  • images
  • 276
  • let
  • StreamRead
  • identity
  • 508
  • 316
  • 864
  • 130
  • 636
  • 150
  • 找到的組件資訊清單定
  • C
  • exten
  • xml2121121
  • load
  • 16
  • -1542
  • 復原
  • xml
  • 1
  • 6021211211
  • vs
  • 二元
  • windows
  • 3564
  • SQL accoun
  • Button
  • firewall
  • 28
  • �
  • Pay介接
  • MS8qKi9Bbk
  • IP
  • IE ESC
  • tuple
  • 3644
頁數 24 / 26 上一頁 下一頁
各瀏覽器中cookie個數和大小限制

各瀏覽器中cookie個數和大小限制

 
 
 
 
 
 

一、瀏覽器允許每個域名所包含的cookie數
Microsoft指出InternetExplorer8增加cookie限制為每個域名50個,但IE7似乎也允許每個域名50個cookie。
Firefox每個域名cookie限制為50個。
Opera每個域名cookie限制為30個。
Safari/WebKit似乎沒有cookie限制。但是如果cookie很多,則會使header大小超過服務器的處理的限制,會導致錯誤發生。

二、當很多的cookie被設置,瀏覽器如何處理
除了Safari (可以設置全部cookie,不管數量多少),有兩個方法:
最少最近使用(leastrecentlyused(LRU))的方法:當cookie已達到限額,自動踢除最老的cookie,以使給最新的cookie一些空間。 InternetExplorer和Opera使用此方法。
Firefox很獨特:雖然最後的設置的cookie始終保留,但似乎隨機決定哪些cookie被保留。似乎沒有任何計劃(建議:在Firefox中不要超過cookie限制)。

三、不同瀏覽器的cookie總大小也不同
Firefox和Safari允許cookie多達4097個字節,包括名(name)、值(value)和等號。
Opera允許cookie多達4096個字節,包括:名(name)、值(value)和等號。
InternetExplorer允許cookie多達4095個字節,包括:名(name)、值(value)和等號。
註:多字節字符計算為兩個字節。在所有瀏覽器中,任何cookie大小超過限制都被忽略,且永遠不會被設置。

某網站的實測結果 http://www.ruslog.com/tools/cookies.html

Browser Max Cookies Max Size Per Cookie Max Size Per Domain1 Usage2
Chrome 4        
Chrome 5 70 4096 bytes NA  
Chrome 6 70 4096 bytes NA  
Chrome 7 70 4096 bytes NA  
Chrome 8 180 4096 bytes NA 0.6%
Chrome 9       7.7%
Chrome 10 180 4096 bytes NA 14.8%
Chrome 11       0.8%
Chrome 12       0.1%
FireFox 2 50 4097 characters NA  
FireFox 3 50 4097 characters NA 36.7%
FireFox 4 50 4098 characters NA 5.2%
IE 6 50 4096 characters 4096 characters 3.0%
IE 7 50 4095 characters 4095 characters 5.4%
IE 8 50 5117 characters 10234 characters 16.3%
IE 9       1.1%
Opera 8 30 4096 bytes 4096 bytes  
Opera 9 30 4096 bytes 4096 bytes  
Opera 10       0.2%
Opera 11 60 4096 bytes 4096 bytes 1.9%
Safari 3       0.1%
Safari 4       0.3%
Safari 5 600 4096 bytes 4096 bytes 3.6%
Safari on mac3 ? ? ?  


但是都找不到 IE9 的限制..
More...
Bike, 2012/7/11 下午 12:21:42
把 Data 轉為 SQL Script (SQL 2008 的功能)
1. 在要匯出的 DB 上, 按右鍵, 選取工作 -->  產生令碼.

 

2. 歡迎頁

 


 3. 選取資料庫
 

4. 設定選項, 記得要選取 "編寫資料的指令碼"
 

5. 選取資料表
 

6. 選擇要匯出的資料表
 

7. 指定 Script 要儲存的位置
 

8. 檢視摘要
 

9. 完工
More...
Bike, 2012/6/19 上午 11:11:33
Template 中新增 IsDefaultNewVersion
IsDefaultNewVersion 設為 true 時, 要改用 { } 來標記變數.
More...
Bike, 2012/6/14 下午 06:53:43
VS2010 中, 在方案總管和編輯的檔案同步 (在方案總管中追蹤現用項目)
有時 VS2010 會不知原因的方案總管不會自動移到目前編輯的檔案的位置, 有點不方便. 要改回同步, 可以勾選 "在方案總管中追蹤現用項目", 如下圖:

要重開 Visual Studio 才會生效。

More...
Bike, 2012/6/14 下午 04:42:37
新增防止駭客的功能
在 Application_BeginRequest 可以加入 BlockHacker

    void Application_BeginRequest(object sender, EventArgs e)
    {
        UW.WU.BlockHacker();
    }

 

可以做一些基本的防駭.

在 Sys_Coonfig 中有兩個參數要設定: WEB_ERROR_ExceptionCountBeforeBlock, WEB_ERROR_ExceptionCountingIntervalInMinutes

另外還有一個參數: WEB_ERROR_DangerousKeywords, 內容請用逗號分隔, 若是發生 Exception 時, Form 或 QueryString 中含有指定的文字, 收到的警告信會標示為高重要性.
More...
Bike, 2012/6/9 上午 09:06:25
global.asax 的事件
從 http://blog.ie-soft.de/post/2007/12/globalasax-events.aspx  抄來的. 留作參考

HttpApplication Events:

Application_AcquireRequestState
Occurs when ASP.NET acquires the current state (for example, session state) that is associated with the current request. 

Application_AuthenticateRequest
Occurs when a security module has established the identity of the user. 

Application_AuthorizeRequest
Occurs when a security module has verified user authorization. 

Application_BeginRequest
Occurs as the first event in the HTTP pipeline chain of execution when ASP.NET responds to a request. 

Application_Disposed
Adds an event handler to listen to the Disposed event on the application. 

Application_EndRequest
Occurs as the last event in the HTTP pipeline chain of execution when ASP.NET responds to a request. 

Application_Error
Occurs when an unhandled exception is thrown. 

Application_PostAcquireRequestState
Occurs when the request state (for example, session state) that is associated with the current request has been obtained. 

Application_PostAuthenticateRequest
Occurs when a security module has established the identity of the user. 

Application_PostAuthorizeRequest
Occurs when the user for the current request has been authorized. 

Application_PostMapRequestHandler
Occurs when ASP.NET has mapped the current request to the appropriate event handler. 

Application_PostReleaseRequestState
Occurs when ASP.NET has completed executing all request event handlers and the request state data has been stored. 

Application_PostRequestHandlerExecute
Occurs when the ASP.NET event handler (for example, a page or an XML Web service) finishes execution. 

Application_PostResolveRequestCache
Occurs when ASP.NET bypasses execution of the current event handler and allows a caching module to serve a request from the cache. 

Application_PostUpdateRequestCache
Occurs when ASP.NET completes updating caching modules and storing responses that are used to serve subsequent requests from the cache. 

Application_PreRequestHandlerExecute
Occurs just before ASP.NET begins executing an event handler (for example, a page or an XML Web service). 

Application_PreSendRequestContent
Occurs just before ASP.NET sends content to the client. 

Application_PreSendRequestHeaders
Occurs just before ASP.NET sends HTTP headers to the client. 

Application_ReleaseRequestState
Occurs after ASP.NET finishes executing all request event handlers. This event causes state modules to save the current state data. 

Application_ResolveRequestCache
Occurs when ASP.NET completes an authorization event to let the caching modules serve requests from the cache, bypassing execution of the event handler (for example, a page or an XML Web service). 

Application_UpdateRequestCache
Occurs when ASP.NET finishes executing an event handler in order to let caching modules store responses that will be used to serve subsequent requests from the cache. 

Application_Init
This method occurs after _start and is used for initializing code. 

Application_Start
As with traditional ASP, used to set up an application environment and only called when the application first starts.

Application_End
Again, like classic ASP, used to clean up variables and memory when an application ends.

Session Events:

Session_Start
As with classic ASP, this event is triggered when any new user accesses the web site.

Session_End
As with classic ASP, this event is triggered when a user's session times out or ends. Note this can be 20 mins (the default session timeout value) after the user actually leaves the site.

Profile Events:

Profile_MigrateAnonymous
Occurs when the anonymous user for a profile logs in.

Passport Events:

PassportAuthentication_OnAuthenticate
Raised during authentication. This is a Global.asax event that must be named PassportAuthentication_OnAuthenticate.
 

Possibly more events defined in other HttpModules like:

System.Web.Caching.OutputCacheModule
System.Web.SessionState.SessionStateModule
System.Web.Security.WindowsAuthentication
System.Web.Security.FormsAuthenticationModule
System.Web.Security.PassportAuthenticationModule
System.Web.Security.UrlAuthorizationModule
System.Web.Security.FileAuthorizationModule
System.Web.Profile.ProfileModule

More...
Bike, 2012/6/9 上午 08:55:08
便用非管理者帳戶來執行網站, 會遇到載入 DLL 的問題 -- 無法載入檔案或組件 XXX 或其相依性的其中之一。 存在某個不正常的 API 呼叫。
我今天試著建立一個一般的使用者帳號來執行某個網站 (<identity impersonate="true" userName="XXX" password="abcdefg"/>) , 遇到以下的問題, 結果把該使用者加入 IIS_IUSRS 就 OK 了.

無法載入檔案或組件 'FredCK.FCKeditorV2' 或其相依性的其中之一。 存在某個不正常的 API 呼叫。 (發生例外狀況於 HRESULT: 0x800300FA (STG_E_ABNORMALAPIEXIT))

 
More...
Bike, 2012/6/9 上午 08:26:48
一個有趣的 Cut 圖的網站
先記在這, 有空再來研究一下它的程式碼. 看樣子 HTML 5 有很多值得研究的東西.

http://www.pasteshack.net/
More...
Bike, 2012/6/6 下午 04:02:22
把 Hashtable 的 Keys 轉為 String Array
有點笨的問題, 但每次遇到都忘了要怎麼定義字串陣列 :P 在這裡記錄一下.. 以下的 HT 是一個 Hashtable
Dim arrKeys(HT.Count - 1) As String
HT.Keys.CopyTo(arrKeys, 0)
More...
Bike, 2012/6/6 下午 03:58:21
CKEditor 的 insertHTML 和 setData
在 CKEditor 中, 使用 insertHtml可以保留游標的位置, 所以在插入文字時, 大多使用 insertHtml, 但在CKEditor 的內容為空白時, insertHtml好像會失效. 這時就要用 setData 了.

if(CKEDITOR.instances['<% = me.txtContent.ClientId %>'].getData() == ''){
    CKEDITOR.instances['<% = me.txtContent.ClientId %>'].setData('<img src="' + oRes.msg + '" alt="" />');
}
else{
    CKEDITOR.instances['<% = me.txtContent.ClientId %>'].insertHtml('<img src="' + oRes.msg + '" alt="" />');
}
More...
Bike, 2012/6/4 下午 09:28:58
|< …15161718192021222324… >|
頁數 24 / 26 上一頁 下一頁
~ Uwinfo ~