I am trying to check if a string is part of the page URL in various android browsers using the following code. It doesn't work in any android device. When I check in iOS devices or in desktop (windows OS) browsers it works fine.

Any ideas??

```
<script type="text/javascript">
$(document).ready(function () {
    if(window.location.href.indexOf("apieceofstring") > -1){
         alert("success");
    }
});
</script>

```