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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:05:02+00:00 2026-05-24T22:05:02+00:00

I am trying to read a json file at localhost. it is not read

  • 0

I am trying to read a json file at localhost. it is not read by the browser.
is this even possible? the json file is kept in my local pc.

 $.getJSON("p.json",function(data){
      alert("success");
     });

chrome gives me a 404 for this. the file is there. http://localhost/myfoldername/p.json

what is it that i am doing wrong? the json file has not been prepared by a server, but i have prepared it my self. the syntax is correct, though.

EDIT: if i shoot to the file in the browser by hitting its url, localhost/myfolder/p.json, it gives me a 404.3 error saying if it is a script file, there should be a MIME handler for it. how to get this working?? – amit 0 secs ago edit

  • 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-24T22:05:03+00:00Added an answer on May 24, 2026 at 10:05 pm

    If the server says it is a 404, that means it cannot find it. 99% of the time this means that there is some problem with the request. Some thoughts:

    1. When you navigate to localhost/myfoldername/p.json do you get a 404? If so, that means that your path to the file is wrong. Make sure that myfoldername/p.json is in the appropriate directory on your hard drive (last night I lost a minute or so because I accidentally managed to save something to C:\xampp\php instead of C:\xampp\htdocs).
    2. If you got a 404 in the previous step and have confirmed that the file is in the right location, then you’ll want to make sure that the file does not have any whitespace in its name (unlikely, but it does happen sometimes).
    3. p.json is a relative URL, is your current file in myfoldername? If not, the request will be to the wrong directory. Change “p.json” to myfoldername/p.json or ../myfoldername/p.json.

    Edit

    Just noticed your edit. I had not realized that IIS disabled the .json MIME type by default. You can find instructions on how to configure that here.

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

Sidebar

Related Questions

I'm very new at JSON, I'm trying to read one parameter of this file
I'm trying to return json content read from MySQL server. This is supposed to
I'm trying to get Jquery to read a json file, But unfortunately I can
I am trying to read from a csv file and insert the data into
I'm trying to read some JSON data from the Tumblr API. I'm using the
I have a JSON file here: http://dalexl.webs.com/products.json I'm trying to read it on my
I am trying to read certain values from a json string in php, I
Trying to read headers for a csv file with: reader = csv.DictReader(open(PATH_FILE),skipinitialspace=True) headers =
I'm currently trying to read in an XML file, make some minor changes (alter
I'm trying to read a .doc file into a database so that I can

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.