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 8740375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:07:12+00:00 2026-06-13T11:07:12+00:00

I have the following situation: User makes request to PAGE A that displays a

  • 0

I have the following situation:

  • User makes request to PAGE A that displays a form (server stores cache of this page)
  • User submits the form to CONTROLLER that is used for form submit
  • CONTROLLER finds an error in user submitted data, sets a cookie ERRORS detailing such, and redirects the user back to PAGE A
  • PAGE A shows the original content plus the ERRORS (server stores cache of this page)
  • PAGE A deletes ERRORS cookie

This works, but only if I don’t use cache on my system for PAGE A.

Problem is that, after deleting the cookie, browser makes a request to my server without the cookie and gets a 304 Not Modified error and, as a result, the browser still shows the page with the error, instead of without (from the original request). Server stores cache properly (for page that has an error as well as an error-free page).

Basically the server has two cached pages now: PAGE A and PAGE A WITH ERRORS.

Browser, whose last known page was PAGE A WITH ERRORS asks for server a page with conditions of PAGE A, instead of PAGE A WITH ERRORS, since cookie does not exist anymore. But it thinks that the 304 response is about the PAGE A WITH ERRORS, instead of PAGE A. I even checked the data sent by the browser, it knows that it got PAGE A WITH ERRORS with the ERRORS cookie, yet accepts 304 not modified when making requests without that cookie. It does not validate its own cache against the conditions it was created under.

Doesn’t browser validate its cache with the cookies it has set?

And is there a workaround for it without setting some GET variables for each request? Another alternative is to tell servers to never cache pages that have such an ERRORS state set, but that would be a hack.

  • 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-06-13T11:07:14+00:00Added an answer on June 13, 2026 at 11:07 am

    Apparently the solution was to include this as a response header:

    Vary: Cookie
    

    This will take cookies into account in caching engines.

    EDIT:

    There is a problem though: Chrome, Internet Explorer and Firefox work as expected, but Safari and Opera both ignore ‘Vary’ header when storing and validating cache.

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

Sidebar

Related Questions

I have following Situation, Server A sends some data (HTML form) to server B,
I have the following situation: I have class User with the follwing properies :
Here's my situation. I have two tables: pledges and pledge_transactions. When a user makes
This is a situation that comes up often: In the View, you have a
i have the following situation: someone needs to select a player that is currently
I have the following situation: excel-like application, that is accessible from internet. 2 users
I'm in a situation where my web page have the following types of URL's
I have the following situation I spawn a long running user thread ( Thread
I have following situation in my WinRT metro (c# - xaml) application : User
I have the following situation, I have a WCF Data Service with User objects

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.