Issue
my project is working fine when I am opening it through vs code live server , it has API in it
but when I am opening it directly through my folder its doesn't work , I don't understand what's the problem . Also the URL changed , Please someone help me , what's the problem ??
Solution
The difference is that in the first case, the page is being served by a web server, whereas in the second, you're just loading the file off of the disk, directly into the browser.
In the case of a static HTML page, this doesn't matter, because there isn't any processing that has to be done, but when you start using web services that get called by Javascript, it does matter, because those web services are programs that have to be run on the server side, and that server isn't available if you're just loading the files off of the disk.
Answered By - Aaron Averett
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.