acloudtree

Category AJAX

Developing a Chrome Extension and the “Origin is not allowed by Access-Control-Allow-Origin Error”

I have been messing around building a Chrome extension and am fetching some resources using good ol’ XMLHttpRequest(). At least I was trying to do so and instead was getting an epic fail.

I am using the google developer debugger to test (tutorial) and saw the following error in the console.

Example:

Origin [YOUR_RESOURCE_NAME] is not allowed by Access-Control-Allow-Origin Error.

I thought I had configured my manifest.json file with the correct permissions.

...snip...
  "permissions" : [
    "https://*.domain.com"
  ],
...snip...

Turns out I was simply missing the trailing slash /.

...snip...
  "permissions" : [
    "https://*.domain.com/"
  ],
...snip...

Hope that helps someone.

www.redb.org

So I started telling people about my little data scraping website. It is cool that something I have been devoting my free time towards for 9 months, is now finally coming to light. I am really excited to see what feature requests I receive from users and where that leads the development of the site.

http://www.redb.org

-peace

Flashback (pun totally intended)

This was my first flash website, designed back in 2002. My oh my how things have changed. It is strange to reflect on what the common thought of the time was.

Flash gives the user instantaneous feedback…”

Flash will allow users to interact dynamically with a website…”

Flash is going to revolutionize the web…”

What is odd about this, is that you can replace the word “Flash” with “AJAX”. The hype around this asynchronous tool set is enormous and everyone loves a good buzzword. Personally, I have barely started to using “AJAX” but am taking what I learned from my Flash days and applying it to Ajax.

  1. Don’t buy into the hype, investigate.
  2. Invest some time in learning the new stuff, but don’t be such an early adopter that you get burned (HD-DVD for a recent example)
  3. Make sure you look to the future yet still create something that works in the now.
  4. There will always be something around the next corner

I think Flash has it’s place. I think AJAX is in the process of defining it’s place. I think every language and technology has a place. A common geek mind set is to latch on to something, and hate everything else. It is only my opinion, but this mind set will simply lead to self destruction. Nothing good, positive, or productive will come by thinking this way.

“Learn or Die” that is what it is all about.

Copyright © Jared Folkins
Programming, Computers, Writing, Economics, and Life

Powered by WordPress