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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:23:39+00:00 2026-06-10T00:23:39+00:00

I am managing my category variables using php session. If a user clicks like

  • 0

I am managing my category variables using php session.

If a user clicks like this:

  1. index
  2. category (category sets a session variable)
  3. product (product fetches that variable)

After, if the user, instead of pressing the home link (which refreshes the index page), presses the browser’s back button this happens:

  1. the user just reached the index page with the category variable set earlier;
  2. if he clicks on a product directly from the index, the old category is getting displayed.

Basically,
Is there a way to set new session variables when a user hits the browsers back button (and the page is not refreshed)?

  • 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-10T00:23:40+00:00Added an answer on June 10, 2026 at 12:23 am

    And this is exactly why you should keep requests self contained. All the information you need to build your navigation should somehow be present in the request itself, meaning in the URL. Either you can deduce the category from the product the user is looking at or some other information already contained in the request, or you should transport the selected category in a query parameter (...?cat=42). This way each request expresses all the necessary information within itself and will not screw up any separate state saved elsewhere.

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

Sidebar

Related Questions

I use supervisord for managing tornado with no issuse wnhile using nginx as a
I'm managing a website that is built from the ground-up in PHP and uses
•Managing Network Adapters Using GetAdaptersInfo •Managing Interfaces Using GetInterfaceInfo •Managing IP Addresses Using GetIpAddrTable
I'm managing a shared auth cookie when making WCF service calls via this methodology
Apple provides documentation for managing user preferences through both Core Foundation and Foundation Kit
I'm managing a project using trac. I have structured pages hierarchically and they look
Duplicate Managing date formats differences between PHP and MySQL PHP/MySQL: Convert from YYYY-MM-DD to
I'm managing a git repo using the integrator work flow. In other words, I
A user can be in groups. And an item/product is assigned groups that can
I am managing a website which has about 140.000 documents. This system had been

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.