I observed that using Internet Explorer 9 to show a jQuery-page some times the loading gets broken when using outboundRules in Web.config.
THE SETUP
To reproduce the behavior on a Windows 7 Professional machine (or use attachment):
Now you can see that the link is perfectly rewritten when moving the mouse over it.
You can even click the link hundred times, no problem.
THE PROBLEM
Now when you click F5 several times the jquery stops working and Internet Explorer gives an error like:
row 9: error "$" is undefined
(thats the row with $(document).ready(function ())
points of interests:
Any ideas how to solve this?
regards,
Foizman
Listing 1 (default.aspx):
<%@ Page Language="vb" AutoEventWireup="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test</title>
<script src="jquery-1.8.1.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
});
</script>
</head>
<body>
<form id="form1" runat="server">
<p>
Move Mouse over the link to show the rewriting of the Url</p>
<p>
<a href="default.aspx?id=123">Reload</a></p>
<p>
Now using Internet Explorer press F5 several times...</p>
</form>
</body>
</html>
Listing 2 (web.config):
<?xml version="1.0"?>
<configuration>
<system.webServer>
<rewrite>
<outboundRules>
<remove name="Test" />
<rule name="Test">
<match filterByTags="A" pattern="^default\.aspx\?ID=(.+)"/>
<action type="Rewrite" value="default.aspx?rewritten({R:1})"/>
</rule>
</outboundRules>
</rewrite>
</system.webServer>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>