If I run a curl command:
curl https://theprepared.life/data/earthquakes-today.json
I get back the json object correctly. So your server work properly.
So unless from a different origin, when you running $.getJSON()
call, you only need to submit data/earthquakes-today.json
as the url, instead of the entire url, which caused the 404 error.
$.getJSON("data/earthquakes-today.json", function(data) {
// rest of the code here
});
BTW, %E2%80%8B
is UTF-8 code for <
, You should check your server for the 404 page script or redirect.
Related Posts:
- How can I automatically login using a URL?
- change wordpress pagination url after doing the request
- How can i do public ajax call?
- Can’t GET Variable from AJAX URL
- Turn a URL into content preview
- Google Maps API throws “Uncaught ReferenceError: google is not defined” only when using AJAX
- Initialize TinyMCE editor / visual editor after AJAX insert
- Using Ajax with a Class file
- Displaying PHP Errors from admin-ajax.php
- wp_set_auth_cookie() doesn’t work in Ajax call
- WP-AJAX vs WP REST API: What to use for requests to the website from outside?
- Stop admin-ajax?
- The correct method to pass query vars in AJAX using ajaxurl
- Is it safe to assume that a nonce may be validated more than once?
- Using Nonces for AJAX that only retrieves data
- store/cache ajax sent data to avoid repeated request
- How to implement AJAX post navigation into WordPress?
- Run again current query via ajax but changing a var
- Quick Edit: Selected Custom Taxonomy Not Refreshing After Save
- Is it OK to use a system cron to trigger a function hooked into the AJAX API
- wp_verify_nonce always returns false when logged in as admin
- fetching via fetch/ajax gutenberg block data from third party
- Conditional action hooks
- Is it safe to use $_POST directly in my plugin instead of using admin-ajax.php to receive data from ajax?
- How to make get_theme_mod work with AJAX in the customizer preview
- How to check an ajax nonce in PHP
- admin-ajax.php slows down, but cant figure out which plugin
- Fatal error: Call to undefined function get_post() with ajax
- Convert this relative path to absolute
- Load WP content with ajax less server demanding and faster than normal page loading?
- WP Admin AJAX Security – using POST to include a relative URL
- Admin-ajax.php 400 error
- wp_create_nonce() in REST API makes user->ID zero
- Plugin: AJAX query external API to sync to tables
- splitting the URL using jQuery
- How do I get reusable blocks via frontend REST API?
- AJAX Load more on CPT returning random posts
- WordPress admin-ajax.php not available for subscribers/contributors
- Why WordPress plugin url ajax doesn’t work?
- WP Ajax never returning any data / calling action
- get_queried_object_id in AJAX
- Should I check for privileges before hooking into `wp_ajax_$handle` or after?
- Refresh Markercluster after ajax call
- Mapping Backbone Models to serialized array in wp_options table
- WordPress Settings api data not sanitized if i use ajax
- Images loading over http instead of https
- Ajax login without redirect/reload
- wp_mail 200 response but no mail sent
- Ajaxify Form That Submits To Same Page To Display Post Data [closed]
- Ajax call with javascript in post content (not enqueued)
- Change header.php after ajax call
- Retrieve JSON file from JS trough php
- Nonce doesn’t validate in nopriv call
- Using admin-ajax prevents regular php form submission
- Sql formatting for post data within function
- Get returned URL from wp_remote_post if response code is 302
- Change URL without reload Ajax
- Admin-ajax.php 400 error in custom theme
- Hide Load more Ajax button if there is no more users to load or less than the number?
- Send checkbox status with Ajax / JSON and save it
- ajax refresh to display new posts
- wp ajax execution time aborted 30 sec
- How to get setting from separate file?
- Contact form – ajax, wp_mail
- WordPress function not defined in AJAX call
- admin-ajax.php calls fail if referrer is sent with 500
- Fetch value using AJAX in WordPress
- AJAX not working when clicking load more button, when two terms are present in tax_query
- AJAX – get_posts for a specific post type returns empty
- Admin Ajax always return 0
- What is the relationship between UFW (firewall) being enabled and cron job running?
- WPBakery post content inside Bootstrap Modal
- error_log() not working within wp_ajax_{action} handler
- Hook after all metadata are set is triggering several time
- check_ajax_reffer not working when logged
- Assign author on ajax wp post insert
- Ajax a php file that has Advanced Custom Fields in it
- AJAX is not submitting data to database
- Ajax show custom post data form & script
- Portfolio list view after clicking back button
- Create a post with REST API and adding a category
- how to correctly use json_encode with ajax
- How to trigger lost password email using REST API?
- Display post thumbnail after clicking on post id with AJAX
- Using AJAX on Contact-form the WordPress way
- Retrieve Header Background Image with AJAX
- How to block search engines indexing certain AJAX actions
- AJAX call in backend results in empty update_option
- Ajax Comment: Page reloads whenever the comment submission form is reloaded
- wp_ajax_action, wp_ajax_nopriv_action not working
- get_comments() returns empty array if called through AJAX
- Call admin ajax using absolute url? Relative URL breaks (frontend ajax)
- Manually cache a special, non-WP-but-using-WP page (e.g. Ajax results) with W3TC
- Is it a good idea to init ajax functions only while ‘DOING_AJAX’
- How to get parent comment’s id?
- Static var overwritten with WP AJAX action, works fine without AJAX
- using ajax to query sql
- $wpdb Ajax not redirecting to main page
- how reduce fetch/XHR response time
- Custom WP rest api endpoint only working on non https?