Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5951785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:35:14+00:00 2026-05-22T17:35:14+00:00

I have a webapp that has a start page that can redirect to two

  • 0

I have a webapp that has a start page that can redirect to two other pages. The start page has no security, one page is for user level access, and one page is for admin access. They are just basic html pages that load a fair lot of javascript on top of them.

The browser seems to be remembering the html, css and structural javascript and renders the page, although none of my onload javascript functions fire because they need server communication which fails the permissions check because there was no login.

While I understand this and just click refresh and it takes me to the login page, someone else using the app will likely just get confused and close it or call and report a problem.

I am using Spring Security. Is there any way to enforce the html to go through the security filter and keep the browser from doing its own thing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:35:15+00:00Added an answer on May 22, 2026 at 5:35 pm

    You should be able to do this by setting the relevant cache-control directives in the HTML itself or in the response headers. For example:

    <%
    response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
    response.setHeader("Pragma","no-cache"); //HTTP 1.0
    response.setDateHeader ("Expires", 0); //prevent caching at the proxy server
    %>
    

    (Note that the headers have to be set before the JSP commits the response header by doing something to write output. So the above has to be right at the start of the JSP.)

    If that doesn’t work, another trick you can use is to append a nonce query to the end of the URL for the HTML page (e.g. http://example.com/foo.html?q=<random-number>) and change the nonce each time you send the URL.


    However, ultimately you have no way of forcing a recalcitrant browser to refresh / refetch the page. So ultimately, you have to accept that your Javascript may not run … and you should not rely on it to implement your web UI security / access control checks. (Not that I’m saying that are. Just, don’t …)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a java webapp that has to be deployed on either Win or
I have a Django webapp that has both a front-end, web-accessible component and an
I have an iPhone WebApp that is installed to the home page. When a
multiple webapp running on same tomcat using same jvm. sometime, one webapp that have
I have a webapp development problem that I've developed one solution for, but am
I have an existing web app that has a data layer and a bll
I have a webapp that I am in the middle of doing some load/performance
I have a webapp that lists all of my artists, albums and songs when
I have a Java EE webapp that works perfectly when I run it on
I have a fairly large webapp that I run on a Media Temple server.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.