Javascript that fully functions like meta refresh

Post November 7th, 2005, 6:53 am

http://grizzlyweb.com/webmaster/javascr ... ection.asp
SHARON: I have written but yet received no response.
GW: "The traditional method for redirecting a page is to use a "refresh" meta-tag. The biggest problem with using this method is that the redirection page is included in the visitor's page history, and thus when the user selects the "back" button and reaches the redirection page again they will be immediately returned to the redirection-target page"...

SHARON: and those visitors may not want to return to the site.

GW: "Here is exactly the same JavaScript redirection file but without all of the comments. This is provided to let you see that this really is a small and clean solution."

SHARON: I've spent about six hours trying to figure out how to go about using a metatag refresh (or javascript) inside a frame, that allows a large animated gif to load about 15 seconds *after* the main page is executed and starts loading, without the problem of the visitor having to click back out 2 or 3 times to get back to point of origin (because of html files that were stored in the browser.)

I've surfed all over Google, and the above script is the *closest* I've came thus far, but something isn't quite right. However, the script doesn't allow the browser 15 seconds to load the iframe, it immediately refreshes to the new page. That defeats the purpose --giving the rest of the page time to load, before executing the framed file.

Please double check that script and find out if there is a reason it is not allowing the time-delay of x# of seconds before loading that redirect or refresh target page.

----

SHARON: I found another great page on the problem. Yet, I am facing the same problem with the iframe immediately loading the large animation, no time delay. I'm using Internet Explorer 6.0.

Concerning advice located at:
http://www.insidedhtml.com/tips/functio ... /page1.asp

<script>
<!--
var version = parseInt(navigator.appVersion)
// replace is supported

if (version>=4 ¦¦ window.location.replace)
window.location.replace("http://www.edwardtbabinski.us/frames/universe/")
else
window.location.href = "http://www.edwardtbabinski.us/frames/universe/"
// -->
</script>

The information is *perfect*, except... how to set delayed loading time?

This code automatically refreshes to the page that's targeted, but gives no delay time (half of what a meta refresh tag is used for). I noticed in my search all over the web the majority of webmasters overlook that aspect.

That's the whole purpose for my using a refresh meta tag inside a frame, --to give the rest of the page time to load, before loading these sizeable graphics into the frame.

But if our visitors want to click on the back button and leave our website, I do not want them trapped with a disabled back button that's loading meta refresh pages. I want them to be able to return right back to wherever they came from. Having to make multiple clicks on the back button is aggravating and confusing).

Please explain how to set a time delay in the javascript?

Here's my URL:
http://www.edwardtbabinski.us/test/testing-nav.html
Yep, your script works, it says they can go straight back to point of origin... But as you see at:
http://www.edwardtbabinski.us/test/load ... verse.html
I want it to load in 15 seconds, not immediately.

Here is the HTML on the "Loading Page" -- the purpose: as our web pages are loading, the visitor sees a small "Loading" statement scrolling inside an iframe. After 15 and 20 seconds, the web page has likely finished loading... then, these large files load into the page. If they want to leave, I don't want to break their back button with meta refresh pages.
I need the script to #1 Wait 15 seconds before loading the advertisement.

I need the script to #2 Not leave a record in their browser history of this loading page, so they can return to their point of origin without hinderance.

<html>
<head>
<title>Loading...</title>
<meta content="Elegant Universe" name=description>
<meta content="Elegant Universe" name=keywords>
<meta name="robots" content="noindex,follow">
<meta http-equiv="refresh" content="15; url=http://www.edwardtbabinski.us/frames/universe/">

<script>
<!--
var version = parseInt(navigator.appVersion)
// replace is supported

if (version>=4 ¦¦ window.location.replace)
window.location.replace("http://www.edwardtbabinski.us/frames/universe/")
else
window.location.href = "http://www.edwardtbabinski.us/frames/universe/"
// -->
</script>

<style>body {scrollbar-arrow-color: #5B5959; font-family: tahoma; font-size: 12; scrollbar-darkshadow-color: #000000; scrollbar-base-color: #ececec; background-color: #131617} a {color: #808080; text-decoration:none} a:hover{font-weight:bold}</style>

</head>

<body bgcolor="#131617">

<font color="#cccccc">

<a name=scrollingCode></a>
<marquee onmouseover="this.stop()" onmouseout="this.start()" scrollAmount=2 scrollDelay=1 direction="left" width=500 height=355 align="left">
<sup><strong>L o a d i n g N O V A <em> E l e g a n t U n i v e r s e </em> . . . . </strong></sup>
</marquee>
</font>
</body>

</html>

Thanks, Sharon
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post November 7th, 2005, 6:53 am

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 110 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2010 Unmelted, LLC. Driven by phpBB © 2010 phpBB Group.