When I was trying to use jQuery $.ajax() or $.get() function retrieve some random value from the server side, it’s working fine on firefox or chrome, but not IE. The server side code like below (written in ASP.NET MVC):

C#

1

2

3

4

5

6

7

publicclassHomeController:Controller

{

publicActionResult GetRandomCount()

{

returnJson(newRandom().Next(1,100),JsonRequestBehavior.AllowGet);

}

}

The client side code:

XHTML

1

2

3

4

5

6

7

8

<a href="javascript:void(0)"onclick="CheckCount()">Check Count</a>

<script>

functionCheckCount(){

$.get('/Home/GetRandomCount',function(data){

alert(data);

});

}

</script>

I’m supposed to get a random number every time I click the link, but in IE, always same one returned. Regarding Craic Computing’s Blog, that’s because IE will cache the value first returned, and trade rest requests as identical by default, so it won’t update the value since the request URL never change.
To fix this issue, just disable cache in the jQuery function as following:

By default, the tag <a> is an inline element, there is no way to set custom height for it. It only changes along with the text size. But you can change it to be block in order to set a custom height like below: