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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:19:08+00:00 2026-05-26T06:19:08+00:00

Sounds strange but what about the scenario posting contents with Javascript (for example AJAX)

  • 0

Sounds strange but what about the scenario posting contents with Javascript (for example AJAX) without using a form (could be possible to read several contents from the surface).

Where should I place the csrf_token template tag? I already added the AJAX Fix:
https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#ajax

…but I get the “CSRF verification failed. Request aborted.” 404 Error.

  • 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-26T06:19:08+00:00Added an answer on May 26, 2026 at 6:19 am

    You must set a custom HTTP header, X-CSRFToken, in your AJAX request. See: https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#ajax

    If you’ve already followed that advice, it should be working. Use something like Firebug to monitor the request that’s being sent and inspect the headers to ensure that the custom header is truly being passed. If it’s not, then check your implementation again to make sure you did it just as the docs describe.

    Also note:

    Due to a bug introduced in jQuery 1.5, the example above will not work correctly on that version. Make sure you are running at least jQuery 1.5.1.

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

Sidebar

Related Questions

It sounds strange but this is exactly what I want because I am using
This sounds really stupid, but I was told that you could drag-and-drop visual components
I know this sounds strange, mixing CDI (Weld) and Spring for the controller. But
I know this sounds strange earlier I asked about similar question in one of
Sounds strange but I cannot tell which ruby version is installed. If I do
I know this sounds strange, but on my development box I can't go back
Question may sounds strange but I want to make this question clear. Some people
This may sound strange but sometimes when your ASP.NET webapp isn't working and you
It may sound strange, but in my PHP application I need to check if
Sounds like a weird question, but say I have something like this: $.post( /myajax.php,

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.