Curious: display page without header/footer IF page is not top

Hello, all,

Is it possible to display an error page without headers/footers if the page is within an iFrame or other such not-top element?

Example: I have an error page that just displays a generic error message and sends an email with details to the admin. This page includes a header (with naviation links) and a footer (with links to other sites). But when an error occurs within an iFrame element, then the page shows a duplicate of itself (including headers and footers) within the iFrame. Is there a way to dynamically remove the header and footer if the error page is inside an iFrame?

V/r,

:slight_smile:

It’s not ideal… but it works…

I’ve placed vanilla JS inside the error page that detects if it is the top. If not, it redirects top.window.location.href to the error page.

(shrug)

:slight_smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.