Category: Miscellaneous

Hide Firebug ajax calls

Finally i got some time to post a new post. I have been thinking how can I ajax calls from being displayed in firebug console.

I can sound foolish being a developer I never read about firebug api, used firebug addon for best of my development practices.

In the api there is an api function for firebug,

 

 

 

1
2
3
4
5
6
7
8
// detect if firebug is open


if (window.console || window.console.firebug) {
console.clear(); // clear the console

}

You can use this after every ajax call example.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// create a function


function clearConsole()

{

if (window.console || window.console.firebug) {
console.clear(); // clear the console

}

}

jQuery.ajax({
type: "GET",// can be GET OR POST

url: urlx,
cache: false,
error: function()
{
alert('error try again!!'); // show error or whatever

clearConsole();// call the function

},
success: function(html)
{
clearConsole();
//--- you code----

}
}
});

 

as you can see the function has been called on error as well as on success, since you would need to hide the call even when there is an error.
Creating a function would make it easy for you to comments the things at the time of development.
Try At Js Fiddle

CompatViewRefresh

IE force compatibility view

Alright.. so we all are aware of the browser compatibility issues.  Specially when it come to any of those Internet explorers. Most of the times I have faced issues that a website works perfectly in in IE8 but not in IE9 which is weird.

Her is a small trick to enable back word compatibility from IE9 to IE7.

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

you can replace  the “EmulateIE[version]“

usage

<!-- if you want ie8 to work as ie7, you ca replace the versions as per you needs. -->

<!--[if IE 8]>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<![endif]-->
<!--if you want to enforce ie9 to be as ie8-->
<!--[if IE 9]>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<![endif]-->

hope it helps you guys. but i hate microsoft..