Follow JavaScript redirects

The JavaScript location property is widely used for redirecting users to a different page. Setting the location.href properly or using the location.replace() method within a script on your page will forward the user to the page you have requested.

A JavaScript redirect will look like one of the examples below:
<script> window.location.href=""; </script> <script> window.location.replace(''); </script>
If you need to monitor a web page or a web transaction that uses this type of redirect you should enable this option. Our monitoring agent will parse the page content looking for a valid URL used by a JavaScript function with location.href or location.replace(). If such URL is found the monitoring agent will try to open the page and check if it is working properly. This option is disabled by default and should only be enabled if the monitored URL or transaction contains a Javascript redirect which runs automatically when the page is loaded.

Please notice that only the first redirect will be followed, if the result page contains another JavaScript redirect it will not be followed.

Similar topics

Knowledge base


Frequently asked questions

How would you rate the quality of this content?

Poor  Outstanding

Tell us why you rated the content this way.

Current rating: 1.50