htmlioshttp-redirectuiwebview

HTML redirect within body tags?


Is there a method that gives the same result as the meta redirect that can be used in the body of an html doc? Or a reference in the body to CSS? I've been searching but the only things I can find want to make use of other technologies.

N.B. this is for an iOS UIWebView so no php and I'd rather not load any extra js.


Solution

  • If you can use Javascript, something like this should help you:

    <script type="text/javascript">
        window.location = "http://www.google.com/";
    </script>
    

    Check this link to see how to place that inside a function that can be called with "onclick" or "on body load", etc...

    http://www.tizag.com/javascriptT/javascriptredirect.php


    EDITED:

    Another good thing to read about this:

    https://developer.mozilla.org/en/window.location