Check if User Accepts Cookies (Simple)

I looked around for code that checked whether the user’s browser accepted cookies in PHP and found a few approaches. They involved redirection and setting some sort of test cookie. After scratching my head for a little bit I thought why not just check if the ‘PHPSESSID’ cookie is set and go off of that? So here is my tiny function doing just that. HOWEVER, it is important to realize and accept that if you are checking for the cookie on the first page the user hits this code will fail since cookies are set on the second trip to the server. In which if that is the case, you might want to try either code that redirects and returns or a spaghetti approach of setting the cookie, displaying some html (watch your output buffer), then reading the cookie.
I prefer to avoid all that trouble.

    function userAcceptsCookies() {
            return true;
        return false;

How to Add X-Frame-Options In Classic ASP

This is how you add the x-frame-options header to your page in ASP. This can also be done in IIS.
Using the x-frame-options header will prevent your page from being displayed inside another frame, discouraging click-jacking. There are a few different ways to set it up.

1. Your first option is to deny ALL attempts to frame your page.

<% Response.AddHeader "X-FRAME-OPTIONS", "DENY" %>

2. The second option denies ALL attempts to frame your page by any another website not your own.

<% Response.AddHeader "X-FRAME-OPTIONS", "SAMEORIGIN" %>

3. The third option specifies exactly which websites can frame your page. While this option is likely the one you’d use, it is not supported by all browsers such as Chrome and Safari. 🙁
Good thing there is an online test to see which of these your browser supports.

<% Response.AddHeader "X-FRAME-OPTIONS", "Allow-From" %>