file:// links in XUL browser - firefox

I'm trying to get the XUL browser in a Firefox app to display images from "file://" locations, from a page at http://localhost.
I'm running the app with Firefox 30.
I've tried this, but to no avail :
var branch = browser.preferences.getBranch("capability.policy");
branch.setCharPref("policynames", "localfilelinks");
branch.setCharPref("localfilelinks.sites", "http://localhost");
branch.setCharPref("localfilelinks.checkloaduri.enabled", "allAccess");
What's the correct way of allowing file links ?

I don't think it's a good idea run file:// content inside http://. Why can't you use chrome:// or http:// for the images. chrome:// URLs are easy to locate and they come always with your app.

Related

Facebook Profile images not loading on FireTV Firefox browser?

I'm building a webapp that I want to use on a FireTV browser (Firefox) and when I do so, my Facebook images are appearing as broken links.
The images appear normally on all other devices/browsers I've tested (multiple on OSX, Android)
Initially I thought the the firetv browser wasn't liking hot-linked images for some reason as I'm loading them via the graph API, however I'm able to get images hotlinked from other sites to show up just fine on the fireTV as well.... It seems to be something specific about the facebook URLs it doesn't like? Does anyone have any ideas, or know of any tools to help debug it better?
This is what the img elements look like that I'm rendering, for example:
<img src="https://graph.facebook.com/v2.6/112816289586034/picture?type=large" />
Facebook Graph API returns a profile photo URL with a 302 redirect, which apparently is not Amazon FireTV friendly.
The solution was to include redirect=false as a url parameter on the API request, which causes FB to return a JSON object including regular image url that loads as expected.

Mozilla firefox add-on to redirect url from one domain name to another domain without changing the complete url

I want to know is there any add-on to redirect url in mozilla firefox. In Google Chrome there is an add-on Switcheroo. I need the url switcher like this in mozilla firefox. I have already tried with redirect url add-on of mozilla. But its not redirecting correctly.
Requirements:
I need to test the localhost portal pages. But in few places the dev environment url is hard coded. I want to redirect those urls to localhost to test the changes which I made in local.
Eg redirection:
protocol://dev_hostname:dev_portnubmer/wps/portal/abcd/xyz/u!/abcd
should be redirected to
protocol://localhost:localhostPortnumber/wps/portal/abcd/xyz/u!/abcd
For this redirection in google chrome switcheroo add-on I have configured like this:-http://dev_hostname:dev_portnubmer ---> http://localhost:localhostPortnumber. The add-on changing the protocol, domain name, port number. It's not changing the rest of the url part. Its working well as I expected. But in Mozilla I need an add-on like this.
You can use the Requestly extension which is available for both Chrome and Firefox. It has a feature to replace parts of URL which matches a given text or pattern instead of redirecting to a different URL altogether, basically what Switcheroo does. It has other features as well.
For your particular use case, you can follow these steps -
Install Requestly
Click on r icon in address bar
Click on (+) Green Icon to create a new Rule
Select Replace Rule
Replace dev_hostname:dev_portnubmer with localhost:localhostPortnumber
Save
Test your app now.
There is a add-on available for mozilla to redirect url which is Redirector.
I have read the help provided by the Redirector add-on, there they have explained the usage of it clearly.

Custom Web Browser - To Load only my URL - Firefox

I need a Portable web Browser, or any install-able (Windows) Browser, which will only load my URL.
Some thing Like I will have my Shortcut in the desktop, when User click, the Web browser with my URL loads.
Is it possible with portable Firefox to modify, I also need cookies to work along, thats the reason I need to find a custom Web browser.
I just found out a partial solution using
Mozilla Client Customization Kit , we can create a extension which allows to customize firefox upto certain limitations.
https://addons.mozilla.org/en-US/firefox/addon/cck/

302 Redirect to Images in IE8 do not render image

I am helping migrate a legacy application. One of the requirements is we are able to handle requests for old images.
What we have is:
New site on new.com
Old site on old.com
Images to links (imported content) point to /imgs/cat.png however the actual image is hosted on old.com/assets/images/cat.png (for now).
<img src="/imgs/cat.png"/>
I setup a redirect for all png, jpg, jpeg, gif that 302's requests for new.com/imgs/(.*).(png|jpg|jpeg|gif) to http://old.com/assets/images/$1.$2
Everything works find in Chrome, Firefox and IE9 - however it was noted in IE8 the image does not render. Its possible that it has the same issue in IE7, 6 and 5.5 however I have not been able to test this.
Does anyone know why this is happening and how to fix?
I tried setting the contentType header on the response of the 302's to image/(png|jpg|jpeg|gif) and this did not have any impact.
Any insight would be appreciated.
Turns out the host that the images were served from was not a Trusted Site in IE, where as the host that served the page was. Normally youd see a popup asking if you wanted to accept an untrusted resource, however because this was a 302 redirect (original img URL was to the trusted, but 302'd to untrusted) IE never showed the popup.

Internet Explorer does not load images cross domain (https)

this is an updated question:
I am trying to include a picture on an external server.
PROBLEM HERE: my home website is using https:// and the picture on the external server is just http. The picture is fine (tested) but IE seems not to allow to access http:// sources when on a https:// website.
I am looking for html or javascript code to allow access for loading pictures from other domain WHEN my home domain is HTTPS and my external domain is HTTP
thanks
Klaus
I'm afraid this is a feature of the browser. When you enter a page like this on IE and some other browsers, it will give the user the option to disallow "unsecured" elements on the page (this includes elements served over HTTP); and will not display them. Your page cannot override the users' action.

Resources