当前位置:网站首页>How to test cookies
How to test cookies
2022-07-25 04:04:00 【Su San_ suzy】
I don't know if you found out , When we first visit some websites , A dialog box will pop up in the upper left corner of the browser , Prompts will be collected during this session cookie, Ask if you accept . We can choose to accept or reject , If you accept , This will inform the system that we have recorded this information on the server . But what exactly is cookies, What is their purpose ?
What is? Cookies?
Cookie Contains limited data about us collected by each website we visit . Then store the information in a text file on the hard drive of the device we use during the session . then , The data is accessed when the browser requests information from the server , For example, the user we established before ID Or preferences .
Cookie The user most commonly used to store visitors ID Or remember the code of some websites , This allows the user to access more quickly the next time they visit , More convenient . They are often used by shopping websites , Especially those websites that use shopping carts . Marketing websites use them according to users' previous experience in cookie Track and record interests to personalize advertising . They are also used by other websites interested in tracking user visits .
Cookie What information is stored in ?
Cookies It mainly includes :

be-all Cookie Is it all the same ?
all cookie All store small pieces of data , But their uses and purposes are not exactly the same . Biscuits fall into three categories ; conversation cookie, persistence cookie And the third party cookie. conversation cookie Once the browser is closed, it will be automatically deleted from the user's computer , And persistence cookie The expiration date will be attached , Therefore, it will remain on the user's computer , Until it expires or the user actively deletes its cookie cache . Last category cookie Installed by a third party for research reasons , Not through the user's direct activities .
test Cookies Is it important ?
because cookie Can play an important role in the smooth operation of the website , Therefore, it is very important that you test how they are written and stored on your hard disk through the websites you visit . At the same time, exposed security issues are also important , Because of every cookie Important information is stored locally .
How to test Cookies?
Here's the test cookie A series of test case recommendations that can be considered when .
Disable your Cookie
You can disable... From browser settings Cookie. Ban cookie after , You need to test various functions and pages in the website and monitor general functions , Because it may be disabled cookie Unexpected behavior when , Even if the website should be able to actively recover from any potential failure and run normally . Some websites will disable cookie Provide information to users through help messages , Therefore, effective testing will ensure that these schemes can be handled in advance .
By editing the Cookie To test
edit cookie Another way to test an application after information . When cookie For storing users ID When waiting for user information , It's related . You can enter cookie File and use another valid / Invalid number edit current ID. After editing , The website should not let you log in , And should display the correct “ Access denied ” news .
Test by deleting them Cookie
ad locum , You need to physically delete cookie And retest the way the website behaves in this situation . Once they are removed from the computer , The website should still operate normally and provide users with enough information , Not a sudden failure .
Destroy your life Cookies
This is a cookie An important test case in testing . Hackers will use cookie To get information about you and your Web Unauthorized information about the application . They mainly destroy and cover cookie Information to achieve this , The purpose is to let hackers access your website without authorization . This test is very important for banking and financial websites , Because security is crucial . You need to destroy your cookie, And then monitor Web The behavior of the application .
test Cookie For cross browser compatibility
Web pages should be able to be written correctly on all supported browsers cookie. When using certain websites on some browsers , May not store correctly Cookie Information . therefore , It shall also be tested and verified cookie Cross browser compatibility .
test Cookie encryption
We've already said that , user name , user ID And other sensitive information can be stored on some websites cookie In file . To ensure safety , This information should be encrypted before it is sent to the local computer .
Test different websites and browsers Cookie act
Written by a website on a specific browser cookie Should not be used by other browsers or other websites . This scheme needs to be properly tested .
In accepting and rejecting Cookie Time test Cookie act
By setting... On the browser cookie Options are accepted in time / Refuse cookie, You can generate cookie Test each scenario and monitor the behavior of the application at any time .
Where can I find these Cookies?
Because the path varies depending on the browser you use , So... Is not set cookie The location of the text file . To find its location , Please check the browser on your own computer Cookie Set up .
Use Cookie Several problems needing attention in
According to what we have discussed so far , We can see , If you use cookie, The following problems may occur :
common Cookie Test plug-ins
So about the common Cookie Test plug-ins , Let's talk next time ~ Pay attention to me, pay attention to songqin , More knowledge is waiting for you ~
边栏推荐
- Chapter 18 request matcher serverwebexchangematcher of oauth2loginauthenticationwebfilter
- Redis official visualization tool, with high appearance value and powerful functions!
- Homologous strategy, surface longitude
- Shell string
- C language file operation
- GDAL image resampling
- Moveit2 - 8. Motion planning API
- Math. Random, switch selection structure
- Traditional architecture of enterprise digital transformation to medium platform micro service architecture
- Experience sharing of system architecture designers in preparing for the exam: how to prepare for the exam effectively
猜你喜欢

Moveit2 - 8. Motion planning API

数据中台建设(一):数据中台出现的背景

Advantages and disadvantages of zero trust security

Nested if selection structure and switch selection structure

It took me 2 years from Foxconn assembly line to Tencent software testing post~

High temperature in Britain: two airport runways were burnt out, and several railways were restricted to ensure safety

Fiddler grabs packets and displays err_ TUNNEL_ CONNECTION_ FAILED

Localization distillation for dense object detection cvpr2022

Bond network card mode setting

Fifth day of force deduction
随机推荐
Es- retrieve the selected field from the search
Debezium series: Show slave status view the possible different situations of master-slave delay
Postgraduate entrance examination experience
弹性布局(display:flex下 align-content、justify-content、align-items三个属性的作用和效果
How should enterprise users choose aiops or APM?
[Flink] submit the jar package to the Flink cluster and run it
Debezium series: when there are a large number of DML operations in the record source database, the debezium consumption data time lags behind the data generation time by several hours
01_ Education 3
Shell programming (script) (variable)
It took me 2 years from Foxconn assembly line to Tencent software testing post~
基于SSH婴幼儿产品销售系统
DOM event flow
基于ABP实现DDD--领域逻辑和应用逻辑
原创 | ueditor1.4.3-asmx绕过waf
Nested if selection structure and switch selection structure
word怎么取消退出修订模式
01_ Education 1
Use "display: flex; justify content: Center; align items: Center;" Solve the problem that the streaming grid layout cannot be centered
Traditional architecture of enterprise digital transformation to medium platform micro service architecture
Day008 select structure (switch statement)