Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Custom Login with Ajax not working with IE

Finally found out the culprit and solved the problem 🙂 IE caches AJAX requests. So whenever you use AJAX call to set login cookies, you are in for a trouble in IE. Beware!!!!! In your ajax call fill in a random number in the URL so that IE wont catch

In the Ajax call inserted this

    var d = new Date();
    var n = d.getTime();
    req.open("GET", "something.php?user"+username+"&x="+n);

By doing this IE wont cache the AJAX request

Related Posts:

  1. wp_set_auth_cookie() doesn’t work in Ajax call
  2. WordPress AJAX Login Screen
  3. Detecting post type within init action
  4. WordPress Ajax Login without page reload
  5. WordPress Nonce Issue for Ajax Login and Logout
  6. How can I automatically login using a URL?
  7. how to use reCaptcha v3 in wordpress custom login form?
  8. Is it safe to manually sign a user in using AJAX?
  9. Why a strange discrepency between get_current_user_id() when using AJAX versus output of document.cookie?
  10. Ajax login without redirect/reload
  11. Interim-Login form on frontend
  12. jQuery.post returns 0
  13. Ajax login fails: script sets cookies, but is_user_logged_in() returns false
  14. WordPress custom ajax login not working on mobile browsers
  15. jQuery’s .on() method combined with the submit event
  16. Why is die() used at the end of function that handles an Ajax request?
  17. Making my AJAX powered WordPress Crawlable
  18. Why is a 500 error generated by admin-ajax.php not going into the Apache error log?
  19. admin-ajax.php doesn’t work when using POST data and Axios
  20. Custom Form with Ajax
  21. How to process ajax requests correctly using ajax plugins
  22. Gutenberg – how to correctly perform ajax request on backend
  23. get_template_part execute with ajax
  24. How to add WordPress nonces to ajax request
  25. How is it possible that the function of the test page works, but it does not go live?
  26. jQuery Autocomplete not working with wp_localize_script
  27. Is there a way to optimize function that is used for returning data in an ajax-call?
  28. Ajax returning correct data BUT at wrong place
  29. get_posts empty when called via Ajax
  30. admin-ajax.php mixed content
  31. WP-API and Basic Auth returning 403 on POST but not GET
  32. Is there a hook to process a backbone restful PUT request inside wordpress?
  33. Check if username exist with AJAX
  34. How to localized one js file for different actions?
  35. How to add WP API and JS featured image attachment
  36. Using AJAX with Forms
  37. json encode not work in wordpress
  38. wordpress and add actions to button by coding
  39. Get Author Post on author.php with AJAX
  40. Admin-Ajax Error
  41. Stop ajax listener from sending empty parameter to function
  42. MySQL select query with ajax
  43. Bad request 400 from custom ajax call
  44. Get response for check_ajax_referer
  45. WordPress ajax-action how to return content
  46. How to make registration form ajax?
  47. Specify ABSPATH in jQuery url
  48. WordPress action – Pass arguments into action in an AJAX call?
  49. 403 error When i send ajax request on WordPress website
  50. Ajax Call 400 Bad Request error with POST request but not with GET request
  51. While Ajax is working well, media upload isn’t showing the imagines
  52. How can I call an api before user login
  53. Problems with wordpress nonces in Ajax call
  54. Get post content and show it in a div
  55. Output multi-steps form results in same page
  56. why does not work ajax that add_action registered in wordpress
  57. How to get post from pure frontend AJAX (using only post ID)?
  58. Auto load subcategories content with ajax
  59. Multiple AJAX requests using the same ajax_object.ajaxurl
  60. Is there a better way to access transients using javascript
  61. Filter custom post types by custom field using AJAX
  62. How to perform a frontend HTTP call with AJAX when plugin save the new settings?
  63. Refresh loop of custom posts (div) after new post is published
  64. Use ajax request to load sidebar
  65. How to change request URL?
  66. Why the wp_localize_script() does not work correct in my case? ( /wp-admin/admin-ajax.php 400 (Bad Request) )
  67. Updating failed. The response is not a valid JSON response. specific to my browser when I include javascript in my html
  68. Should wordpress nonce be placed in html form or in javascript file
  69. Ajax call returning 0 in page template
  70. If I leave out the wp_die() in the testiframe function I get the ‘0’ appended to my output. If I put it in, the page w/ iframe linked to it crashes
  71. how to make sure js is enabled before executing php function
  72. jQuery AJAX url wit variable
  73. How to pass array from jQuery to PHP with AJAX in WordPress?
  74. Using existing ajax data that is loaded into page
  75. How to force the admin-ajax.php file to load over HTTPS?
  76. Unable to ajax request with meta_query
  77. get_body_class() in ajax envrionment
  78. Ajax WordPress pass post URLs
  79. How To Pass Theme Path In Javascript Ajax to Pass Id On another Page in WordPress Custom Page Template?
  80. AJAX action returning empty posts array?
  81. Infinite Scroll
  82. Cannot add multiple single images at once
  83. WordPress Ajax JSON success return no being recognized
  84. Session variables lost during Ajax calls – WordPress – Sage Starter Theme
  85. WordPress page content only in fancybox except direct click
  86. Ajax takes 10x as long as it should/could
  87. SHORTINIT and sessions
  88. How to use AJAX to check if user is still logged-in?
  89. Ajax navigation and scripts loaded only on certain pages
  90. Closing ajax function file with die() causes error and empty page
  91. How to load wordpress sidebar using AJAX [duplicate]
  92. using Ajax: call to undefined function get_option
  93. How To Pass Ajax Value to PHP Query?
  94. ajax for visitors wordpress
  95. PHP cookie not set within AJAX call
  96. WordPress Ajax send response on every iteration of a loop
  97. Escaping admin_url output being passed to js (esc_js vs esc_url)
  98. wp-admin/admin-ajax.php 400 Bad request (chrome console)
  99. WordPress send Ajax where click button
  100. contact form 7 form not working in admin panel
Categories ajax Tags ajax, login
Link listings with image
How can i remove the posts category class names from body_class

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress