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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:05:09+00:00 2026-05-31T05:05:09+00:00

In a nutshell, I’m trying to figure out how to programmatically enable and disable

  • 0

In a nutshell, I’m trying to figure out how to programmatically enable and disable the redirection for mobile phones, based on a session value, on a per request basis (not statically for everyone).

Here’s the back story:

I’m currently using 51Degrees in my ASP.NET application to redirect requests to the mobile version of the site. I would like to add a feature where users can enable and disable this redirection from a “Settings” page. The setting will be different for each user, and so far every setting I’ve found to disable 51Degrees is static. This makes it difficult to disable it for a subset of users.

One semi-solution I had was to set firstRequestOnly="true" and reverse the redirect if it wasn’t supposed to happen. Although firstRequestOnly="true" has caused a number of other headaches (unrelated) so I would like to keep it at firstRequestOnly="false" and simply enable/disable the redirection based on a session value per request, or per user. The problem is that I can’t figure out a clean way to do this.

  • 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-31T05:05:11+00:00Added an answer on May 31, 2026 at 5:05 am

    Set the cookie in the page prerender event based on the setting your user has choosen in their profile. You would need to have firstRequestOnly set to true. If the user does not want redirection it should have a very long expiry time, if they do then set a short expiry time.

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

Sidebar

Related Questions

Here are the specs that I'm trying to implement in a nutshell: 1) Some
Here's what I've been trying to do, in a nutshell: class example <T extends
In a nutshell what Im trying to achieve is to have a re-usable DLL
So here's what I'm trying to do in a little nutshell, I'm just gonna
in a nutshell: I can't extract meaningful light intensities out of RGB values from
The problem in a nutshell: This is what happens when trying to insert a
In a nutshell, I'm trying to do the inverse of classObject.getDeclaredClasses() . I have
In a nutshell, there's a global stylesheet: a { font-family: Arial; } I want
In a nutshell: I want to do the same thing Dependency Walker does. Is
In a nutshell what my program does is: it executes and takes user input

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.