About Cookies

Good Cookies, Bad Cookies

Without cookies, browsing the web would often be a frustrating experience. And now, thanks to the E.U. GDPR rules, many websites require approval for them to be used, and if you don't consent one gets pestered with the request over and over. Why?

Cookies came about because websites are basically stateless, meaning they don't remember one connection from another. When you click on a link to a site your browser goes through the process of looking up the IP address of the site from a DNS server by its name. Your computer then remembers this address for a time which depends on the time-to-live specified by the server settings. The browser then originates a connection to that address with the site name. The site then returns its home page, or the page specified by the browser as stated in the link and then continues with someone else's request.

After perhaps reading that page, you click on a link on the page for more content. Your browser again contacts the website and requests the new page, however this page may be only for authorised members and you get a request for a username and password, which you complete and the website checks in a separate database and if correct the page is returned.

Sometime later you request another page, also private. The web-server immediately again requests a username and password, because it has no memory of the previous approval. The simple solution to this is the cookie which contains information that proves you logged in successfully and the date/time it occurred.  When another page is requested, the website queries the browser for any cookies it has that originated from itself. It checks the cookie, and if still valid, immediately returns the new page.  The cookie might remain valid for any length of time depending on the situation.  Mostly cookies expire when the browser is closed, but could be valid for the duration of ones subscription.

Cookies are even more important when filling out a form. They allow the server to know how much of the form has been completed.  Remember, that while you are filling out the form the web-server is dealing with many other users all requesting different pages.

This changed a little with the introduction of encryption. (HTTPS). In the early days, encryption took much effort and time to establish, that such sites retained the connection for quite some time or until one logged out.  Typically they are disconnected after 30 minutes of inactivity or so to avoid overloading the server.  On later re-connection on finding a cookie the site may decide to continue where it left off. 

So, basically a cookie tracks ones movements. A bad cookie might also record things one doesn't want to share.  Advertising companies quickly realised they could be used for their own benefit.  Because most sites get money by selling space for adverts, they subscribe to such services in return for a share of any sale profits, rather than bother with doing it themselves.  The problem with this is they don't actually handle these advert themselves, they are actually links to the advertising companies site, who sends them to your browser directly and leaves their own cookie that they can check later. These are known as Third Party cookies. Many browsers have options to block these and you should always enable them.  This won't stop the adds appearing though.  You need an add blocker for this.  These typically check for links or code from known advertisers and prevent the connection.

A big problem with such advertising is that to view a wanted site, each ad link must be visited independently by your browser and often this is slow and delays the wanted site information by many seconds. Also, when the ad finally arrives the browser must re-format the page in order for it to fit., and the part you are reading scrolls of the screen. This is particularly bad on phones where ads appear one above the other, rather than off to the side.

The KeyPay site does use cookies, but has no external advertising and it should therefore be noticeable how much faster pages actually load.