Pages

Thursday, January 12, 2017

Day 10

Current Project: Random Quote Machine
Today's Progress: Still confused, trying to figure out what's going on behind the curtain. Actually I made the Random Quote Machine work today, by finding a proper API on Quotes on design. I think I'll stick with it and continue coding on my project.
Thoughts: The main problem I have been grappling with has something to do with the so called Same-origin policy, which basically doesn't allow some script of one webpage to access data on another, unless is has the same "origin". Since my application is going to eventually run on Codepen (i.e. another page with a different origin than the API), I had to fix it. Apparently there are some ways to work around this issue, like using JSONP or having an API that supports CORS (at least that's my understanding). I don't fully comprehend why it's working now, but since it does I can finally proceed.
Would appreciate if you'd leave a comment below! :)
My plans for tomorrow:
  • Continue coding
  • Further develop a better understanding (found some good resources)
Follow my Pens on Codepen
Follow me on FreeCodeCamp
See my older posts on GitHub 

2 comments:

  1. Congratulations! Looking forward to the end result ;) do you put it on GitHub or on CodePen?

    ReplyDelete
    Replies
    1. Thanks! ;) I'll put the App on Codepen and maybe on GitHub as well (but first I have to figure out how ...).

      Delete