0
How to redirect Javascript Onload without modifying any of the http host and headers?
I used a javascript redirect to a IP of a shared hosting, direct IP access is not allowed. The only way for me to redirect and load the page is with the original http host.
5 Answers
+ 4
do you want to go to that page, or u want to load the content on the current page instead?
+ 4
u need a ajax request to the page u want, or a more simplier method, load the desired page in an iframe on current page, and get the html in the iframe, then use document.write to load it,
this is important
however , the iframe method only works for pages with same origin
+ 4
origin of a page: e.g. www.google.com
if u use www.google.jp or google.com, things wont work
+ 3
or a most idiotic method, use an iframe, and then set style="width:100%;height:100%;"
0
Just load the content from the intended page