"Permission denied to shadow native property" using location.replace to redirect in JavaScript
<p>I'm being bugged by this issue which I'm facing with <code>location.replace</code>. I need to simulate an HTTP redirect (I don't want my users to get stuck in a never-ending back button fiasco for this particular piece of functionality I'm implementing) so I'm using <code>location.replace</code> instead of <code>location.href</code> to redirect. However, I constantly end up on getting the below error message in my console on <code>Firefox 12.0</code>.</p>

<p><code>Permission denied to shadow native property</code></p>

<p>Below is my code (I'm masking off my server details from the request URL while adding the code here)</p>

<pre><code>$(document).ready(function() {

    $(".workout_sel_month").click(function() {
       month_number = $(this).attr('id').replace(/month/g,"");
       weekwise_workout_url = "http://www.example.com/viewrecord/getscheduleformonth";
       location.replace = weekwise_workout_url + "&amp;month_number=" + month_number;
    });

}); 
</code></pre>

<p>Please note that if I use <code>location.href</code> instead it works like a charm. What may be the cause of this? . If this is a duplicate post (I did some basic search and found some posts but none of them particularly suited my case), my sincerest apologies and in that case please link me up with the appropriate question here. :) </p>
