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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:12:22+00:00 2026-05-24T03:12:22+00:00

If I have a website with login and session management, and the pages uses

  • 0

If I have a website with login and session management, and the pages uses ajax to send form data to the server side.

How do I protect anyone from just saving the HTML and JavaScripts, and thereby completely bypassing the login and session management?

Do you generate a token on successful login, and send this along with the JSON string, so the server side script can check against this?

If so, does there exist solutions for this that I can just use, so I don’t have to write them myself?

I am interested in both Djando and ROR solutions, as I am trying out both right now.

  • 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-24T03:12:23+00:00Added an answer on May 24, 2026 at 3:12 am

    You should implement logging in on the server. AJAX requests exist within the same session as regular request, so if someone is logged in, they are logged in for the AJAX request too. If the user is not logged in, you can check this for the AJAX request too. Check on the server if a user is logged in and return an error code if not.

    The server should never rely on the client to tell it whether someone is logged in. The only client data to use for that is the session token, combined with the IP address if you want to be more secure.

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

Sidebar

Related Questions

I have a classic asp website that uses Session variables to store login state
I have a website, im using sessions for the login. In every pages of
I have an php website with login form and I want every visitors can
I have a login form for my website. This login form have two text
I have created Login forms and registration forms for a website. The form is
I have a website which uses PHP and HTML pages, I want to create
I have a classifieds website, where anyone (no need for login currently) can post
Hello i have a website where if the login session times out i save
I have a website/webapp where you can login and it starts a php session.
I have website where users can login with their Facebook account. I am using

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.