Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> JavaScript Off Redirect Script, How to redirect a browser when Javascrip
TavoxPeru
post Jul 22 2006, 01:23 AM
Post #1


Super Member
Group Icon

Group: [HOSTED]
Posts: 760
Joined: 8-April 06
From: Lima - Peru
Member No.: 12,579



Hi, here's a trick that will redirect a browser when JavaScript is turned off. Why not redirect the ones that have JavaScript? It's because less than 10% of browsers have JavaScript turned off; therefore, is better to redirect less than 10% of visitors than over 90%.

Simply paste this code into the HEAD section of your HTML document.

CODE
<script type="text/javascript">
<!--
/* Created by: Will Bontrager :: http://www.willmaster.com/ */

<noscript>
<meta http-equiv="refresh" content="0; URL=http://www.yourDoman.com/noscript.html">
</noscript>
//-->
</script>

Best regards,
Go to the top of the page
 
+Quote Post
Hercco
post Jul 24 2006, 07:01 PM
Post #2


Super Member
Group Icon

Group: Members
Posts: 595
Joined: 4-September 04
Member No.: 228



A little thing that you might not to come to think about.

One point to remember is that some people run their browsers with "maximum security". It might be the browser itself, personal firewall or that company firewall turned a wee bit to tight.

Anyways maximum security browsers might also block meta redirects. For those, create another noscript block to the body part containing a link to the page to be forwarded.

And in general... Try to steer away from meta redirects. If you don't need to do clientside processing (here you need to, the noscript) use HTTP headers. Much neater, much more pro and much more firewall friendly.
Go to the top of the page
 
+Quote Post
Quatrux
post Jul 24 2006, 11:03 PM
Post #3


the Q
Group Icon

Group: [HOSTED]
Posts: 1,047
Joined: 13-July 05
From: Lithuania, Vilnius
Member No.: 7,059



Well, meta redirection got standard for most of the browsers and it is nothing wrong to use it, I just don't understand why people redirect using javascript, it is useful only in some cases, but anyway there are other ways of redirecting, for example with htaccess, but the best way in my opinion would be using headers, which meta tags is the same thing, just HTML. Usually you can send a refresh header, which is the same as a meta tag example on the first post, except server side and a location header, if you use php, you can know more about it on http://www.php.net/header
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Getting Screen Resolution using Javascript.(8)
  2. How To Create A Popup Window With Javascript?(19)
  3. javascript vs java(12)
  4. Javascript: Disable Mouse Right-click In Browser(16)
  5. Best Way To Learn Javascript(9)
  6. Javascript: Text To Texbox And Back To Text(2)
  7. Browser Quaker Script - Shock Your Visitors!(5)
  8. Dynamicdrive: Good Site For JavaScript Codes(5)
  9. Javascript: Simple Slidedown Menu(2)
  10. JavaScript: Hide And Show Any Element With CSS(5)
  11. Ever Needs To Find Out A Table Height Or With With JavaScript(2)
  12. Create And Import JavaScript Modules For A Large Script(2)
  13. Vertical Marquee Using JavaScript(0)
  14. JavaScript Frames & Querystring(4)
  15. Enlarge Image Script(19)
  1. I Need Help With Javascript.(7)
  2. Problems With Dynamically Loading Javascript(2)
  3. One Click To Copy Script(0)
  4. Add Text To Textarea(6)
  5. Javascript Question(4)
  6. Javascript: How Do I Create Embedded Pop-up Windows?(7)
  7. Problem With Javascript Alert();(9)
  8. Include Function For Javascript(7)
  9. Fun With Javascript And Forms(2)
  10. When A User Close The Browser Window(1)
  11. Javascript Help Needed : Alert(z) Works Fine But Document.write Not(2)
  12. Javascript Changes Aren't Working.(6)
  13. Love Script(3)


 



- Lo-Fi Version Time is now: 6th October 2008 - 06:19 PM