CSS stops working on html page

I have a site where sometimes, after the auto logoff, I’ll get a page that is just the html version of the page with no css. Anyone know what i can do to prevent this?

The site has following format: Side and top menu are html. rest is px file viewed through an iframe.

I have two issues. First is that sometimes the iframe logs out but i can still see the html parts as if I’m still logged in. I’d like to prevent that so that on logoff, the entire screen shows the login page, not just the iframe part. and sometimes, the entire page does show the logoff page.

Second is that sometimes, after the iframe only shows login page, the entire page looses its css styling causing the page lo look like in the image below. Its somewhat rare but does happen and i’d like to prevent it.

In your html file, do you have <!–@noSnoop–> near the very top of your page?

OH sorry! This is an HTML file with PX pages passed into the main content…..

Hmmmm…….. You don’t need no snoop for that. Especially since you’re not using bajascript.

Without seeing your html files and such, I can’t offer much else at this time.

Here’s a simplified snippet of code below, its pretty standard HTML stuff.

After some thinking, i’m thinking that maybe the auto logoff causes the browser to loose access to the css file, which causes the page to loose its styling?

<!DOCTYPE HTML>
<html>
  <head>
    <link rel="stylesheet" href="CSS.css">
    <script src="jS.js"></script>
  </head>
  <body style="background-color:#ff9c9c9c">
    

    <!--TopBar-->
    <div class="banner" id="Banner">
      <span class = "navButton" onclick="openNav()">&#9776;</span>
        <button type="button" onclick=frame.contentWindow.history.back(); style="position:absolute; right:80px; top:30%;">Back</button>
        <button type="button" onclick="window.location.href='/logout';" style="position:absolute; right:10px; top:30%;">LogOut</button>
    </div>
      
    <!--iFrame for px files-->
    <div id="iframe-wrapper">
      <iframe id="frame" src="file:^PX/Navigation.px" class="iframe" scrolling="no" >
      <div id="iframe-overlay"></div>
      Your browser doesn't support iframes.
      </iframe>
      </div>
      
      
    <!--Sidemenu-->
    <div class="page" id='page'>
      <nav aria-label="College">
      <!--Sidemenu stuff here-->
      </nav>
    </div>
  </body>
</html>


The autologoff could be an issue. I don’t usually enable auto-logoff for customer.