It can be used by referer to get the page from which you come. When developing a web program, we sometimes need to get the page from which the user is connected, and the referer is used. It is an http protocol, so any language that can develop a web program can be used to develop a web program. sometimes we need to get the page from which the user is connected, which uses referer.
It is an http protocol, so any language that can develop web programs can be implemented. for example, in jsp (the preferred choice for SUN Enterprise applications), it is:
Request. getHeader ("referer ");
Php (as the mainstream development language) is $ _ SERVER [HTTP_REFERER]. I will not give examples of other languages ).
What can it do? Here are two examples:
1. prevent unauthorized connection. for example, I am a software download website. on the download page, I first use a referer to determine whether the previous page is my own website. if not, it indicates that someone has stolen your connection.
2. for the security of e-commerce websites, I use referer on the pages that submit important information such as credit cards to determine whether the previous page is my own website. if not, it may be a form written by hackers, to skip javascript verification on your previous page.
Notes for using referer:
If I enter a page with a referer in a browser, the return value is null (jsp (preferred for SUN Enterprise applications )), that is to say, the referer will only have content when you click to connect to this page from another page.
Secret is a page with iframe. it embeds a. jsp (the first choice for SUN Enterprise Applications) in iframe. Bytes
Bytes. It is an http protocol, so any language that can develop web programs can...