Whenever I use iframes or frames on older websites, I implement an additional security measure using a JavaScript function:
<SCRIPT LANGUAGE="JavaScript1.1">
if (top == self) self.location.href = "../index.cfm";
</SCRIPT>
I also include another hidden check to ensure the page is being accessed correctly....
<cfif (HTTP_REFERER DOES NOT CONTAIN "referer_page.cfm")
<cfabort>
</cfif>
This method effectively prevents unauthorized visitors from accessing or making posts to the page.
The issue is that the JavaScript code is visible in the page source, and it would be better if this information was concealed...
I realize that JavaScript operates on the client side, but I am curious if there is a way to create a similar function on the server side with CF or any other method to prevent prying eyes from seeing it?
I am currently running cf9 on my own site as well as most of my client sites.
Thank you in advance for your assistance