Firefox: This address is restricted

This address uses a network port which is normally used for purposes other than Web browsing. Firefox has canceled the request for your protection.

This message appears if you want to access a website on a non-standard port, e.g. http://example.com:42 .

Being a developer you might run in your non-productive environment a web server listening on such a port. As a workaround you can tweak your firefox by adding the configuration network.security.ports.banned.override to your preferences.

To do so go to about:config, klick on the “I’ll be careful, I promise!” button and right-click any preference. In the appearing context menu click New > String and add the new preference

network.security.ports.banned.override

with a value “1-65000″ or whatever ports you want to access. They don’t describe blocked ports but ports that are considered to be not banned.

I recommend to create a new firefox profile for development and testing purpose and that you only open ports that you really need.

DeliciousDiggTechnorati FavoritesRedditLinkedInFacebookSpurlTwitterWebnewsYiGGMySpaceYahoo BookmarksFriendFeedGoogle BookmarksLiveJournalShare

Install the java plugin in firefox

To install the Next-Generation Java plugin in firefox follow the instructions below which is a summary of this article. If you have been using the classic plugin, see the Notes for further information.

  1. Check if you’re using the 32-bit firefox. Select the menu item Help -> About Mozilla Firefox. At the bottom of the window is a version string line that contains either “Linux i686″ (32-bit) or “Linux x86_64″ (64-bit). If you use the 64-bit version have a look at this blog post else continue.
  2. Exit Firefox.
  3. Change to ~/.mozilla/plugins or to another firefox plugins directory.
  4. Remove all symlinks (or move them to another directory).
  5. Create a symlink for the 32-bit plugin. Execute one of the following lines
    ln -s ${JRE_HOME}/lib/i386/libnpjp2.so
    ln -s ${JAVA_HOME}/jre/lib/i386/libnpjp2.so

    depending on what environment variable you have set. If you don’t know where your java is located find it out with which java or locate java

  6. Start firefox.
  7. Type about:plugins in your location bar to confirm that the java plugin is loaded.
DeliciousDiggTechnorati FavoritesRedditLinkedInFacebookSpurlTwitterWebnewsYiGGMySpaceYahoo BookmarksFriendFeedGoogle BookmarksLiveJournalShare

jQuery injection using Firebug?

A new day, a new question.

I was trying to load a json object while using Firebug and jQuerify to inject jQuery code into the website of the currently active tab. If you don’t know what I’m talking about, these are firefox add-ons. Firebug is a great debugging tool whereas jQuerify adds the jQuery library to any website if it’s not yet loaded.

Now some details to my recent problem. If I enter the URL into the browsers location field I get a proper json object back. If I send an XMLHttpRequest to the same URL the server responses with the status code 301 Moved Permanently. Has this issue to do with the Same Origin Policy (SOP) ?

If so I need a workaround because this URL will be the new API URL for some web apps.

Any suggestions what this could be?

Edit:
It wasn’t a SOP problem but I also had to face with such a problem later. The above described behaviour came from a missing / at the end of the URL. Entering such a URL into the location field the browser automatically add the tailing slash if it’s missing. After I found that out I wasn’t able to fetch the json from another domain. It’s been months that I’ve been coding jQuery a lot so I forgot one little but important information. The server has to send an additional header to allow other domains. More about this later in a seperate post.

DeliciousDiggTechnorati FavoritesRedditLinkedInFacebookSpurlTwitterWebnewsYiGGMySpaceYahoo BookmarksFriendFeedGoogle BookmarksLiveJournalShare