EzDevInfo.com

firefox interview questions

Top firefox frequently asked interview questions

Firefox Web Console Disabled?

How come I get this message from Firefox Web Console

The Web Console logging API (console.log, console.info, console.warn, console.error) has been disabled by a script on this page

The same webpage can print messages in Chrome Console but not Firefox. I opened the same webpage in another computers' Firefox (don't know what version) Web Console can print messages. My Firefox version is the latest, 8.0.


Source: (StackOverflow)

Get image data in JavaScript?

I have a regular HTML page with some images (just regular <img /> HTML tags). I'd like to get their content, base64 encoded preferably, without the need to redownload the image (ie. it's already loaded by the browser, so now I want the content).

I'd love to achieve that with Greasemonkey and Firefox.


Source: (StackOverflow)

Advertisements

Why am I suddenly getting a "Blocked loading mixed active content" issue in Firefox?

This morning, upon upgrading my Firefox browser to the latest version (from 22 to 23), some of the key aspects of my back office (website) stopped working.

Looking at the Firebug log, the following errors were being reported:

Blocked loading mixed active content "http://code.jquery.com/ui/1.8.10/themes/smoothness/jquery-ui.css"
Blocked loading mixed active content "http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.10/jquery-ui.min.js"`

among other errors caused by the latter of the two above not being loaded.

What does the above mean and how do I resolve it?


Source: (StackOverflow)

How to tell if a DOM element is visible in the current viewport?

Is there an efficient way to tell if a DOM element (in an HTML document) is currently visible (appears in the viewport)?

(The question regards Firefox)


Source: (StackOverflow)

How do I manually fire HTTP POST requests with Firefox or Chrome? [closed]

I want to test some URLs on a web application I'm working on. For that I would like to manually create HTTP POST requests (meaning I can add whatever parameters I like).

Is there any extension or functionality in Chrome and/or Firefox that I'm missing?


Source: (StackOverflow)

How to remove Firefox's dotted outline on BUTTONS as well as links?

I can make Firefox not display the ugly dotted focus outlines on links with this:

a:focus { 
    outline: none; 
}

But how can I do this for <button> tags as well? When I do this:

button:focus { 
    outline: none; 
}

the buttons still have the dotted focus outline when I click on them.

(and yes, I know this is a usability issue, but I would like to provide my own focus hints which are appropriate to the design instead of ugly grey dots)


Source: (StackOverflow)

Hide scroll bar, but still being able to scroll

I want to be able to scroll through the whole page, but without the scrollbar being showed.

In Google Chrome it's

::-webkit-scrollbar { 
    display: none; 
}

But Mozilla Firefox and Internet Explorer don't seem to work like that.

I also tried css:

overflow: hidden;

That does hide the scrollbar, but I cant scroll anymore.

Is there anyway I can remove the scrollbar and still being able to scroll the whole page? With just css or html please.


Source: (StackOverflow)

Difference between DOM parentNode and parentElement

Can somebody in explain me in as simple as possible terms, what is the difference between classical DOM parentNode and newly introduced in Firefox 9 parentElement


Source: (StackOverflow)

Does Firefox support position: relative on table elements?

When I try to use position: relative / position: absolute on a <th> or <td> in Firefox it doesn't seem to work.


Source: (StackOverflow)

Turn off caching on Firefox

During development I have to "clear cache" in Firefox all the time in order to make it use the latest version of JavaScript files.

Is there some kind of setting (about:config) to turn off caching completely for JavaScript files? Or, if not, for all files?


Source: (StackOverflow)

'innerText' works in IE, but not in Firefox

I have some JavaScript code that works in IE containing the following:

myElement.innerText = "foo";

However, it seems that the 'innerText' property does not work in Firefox. Is there some Firefox equivalent? Or is there a more generic, cross browser property that can be used?


Source: (StackOverflow)

How do I write a Firefox Addon? [closed]

What are some resources for getting started writing a Firefox Addon? Is there an API guide somewhere? Is there a getting started tutorial somewhere? Is there a developer discussion board somewhere?


Source: (StackOverflow)

How to view/delete local storage in Firefox? [closed]

In Google Chrome there is an easy way to see what's in local storage as well as modify or delete it after inspecting it.

Is there a tool or something to do the same in Firefox?


Source: (StackOverflow)

Targeting only Firefox with CSS

Using conditional comments it is easy to target Internet Explorer with browser-specific CSS rules:

<!--[if IE 6]>
...include IE6-specific stylesheet here...
<![endif]-->

Sometimes it is the Gecko engine (Firefox) that misbehaves. What would be best way to target only Firefox with your CSS rules and not a single other browser? That is, not only should Internet Explorer ignore the Firefox-only rules, but also WebKit and Opera should.

Note: I'm looking for a 'clean' solution. Using a JavaScript browser sniffer to add a 'firefox' class to my HTML does not qualify as clean in my opinion. I would rather like to see something that depends on browser capabilities, much like conditional comments are only 'special' to IE…


Source: (StackOverflow)

jQuery $.ajax(), $.post sending "OPTIONS" as REQUEST_METHOD in Firefox

Having trouble with what I thought was a relatively simple jQuery plugin...

The plugin should fetch data from a php script via ajax to add options to a <select>. The ajax request is pretty generic:

$.ajax({
  url: o.url,
  type: 'post',
  contentType: "application/x-www-form-urlencoded",
  data: '{"method":"getStates", "program":"EXPLORE"}',
  success: function (data, status) {
    console.log("Success!!");
    console.log(data);
    console.log(status);
  },
  error: function (xhr, desc, err) {
    console.log(xhr);
    console.log("Desc: " + desc + "\nErr:" + err);
  }
});

This seems to work fine in Safari. In Firefox 3.5, the REQUEST_TYPE on the server is always 'OPTIONS', and the $_POST data does not appear. Apache logs the request as type 'OPTIONS':

::1 - - [08/Jul/2009:11:43:27 -0500] "OPTIONS sitecodes.php HTTP/1.1" 200 46

Why would this ajax call work in Safari, but not Firefox, and how do I fix it for Firefox?

Response Headers
Date: Wed, 08 Jul 2009 21:22:17 GMT
Server:Apache/2.0.59 (Unix) PHP/5.2.6 DAV/2
X-Powered-By: PHP/5.2.6
Content-Length  46
Keep-Alive  timeout=15, max=100
Connection  Keep-Alive
Content-Type    text/html

Request Headers
Host    orderform:8888
User-Agent  Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5
Accept  text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset  ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive  300
Connection  keep-alive
Origin  http://ux.inetu.act.org
Access-Control-Request-Method   POST
Access-Control-Request-Headers  x-requested-with

Here is a picture of the Firebug output:


Source: (StackOverflow)