0 Replies Latest reply on Dec 9, 2014 4:09 PM by ranger

    Finding page location in cf

    ranger Level 1

      Hi People,


      When I am using iframes or frames (older sites), as a extra security precaution I use the JavaScript function:


      <SCRIPT LANGUAGE="JavaScript1.1">

      if (top == self) self.location.href = "../index.cfm";



      <cfif (HTTP_REFERER DOES NOT CONTAIN "referer_page.cfm")




      It works great to keep visitors (hackers?) from opening and/or trying to post to the page.


      The problem is that the JavaScript displays in source code and the less they know...


      I know the JS is client side but is there anyway to create the function in the server side CF or otherwise hide from prying eyes?


      I a running cf9 on my and most of my client sites.


      Thank in advance