Welcome to Dream.In.Code
Getting Help is Easy!

Join 132,311 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,081 people online right now. Registration is fast and FREE... Join Now!




Page redirect

 
Reply to this topicStart new topic

Page redirect

Justice92
post 30 Sep, 2008 - 02:51 AM
Post #1


New D.I.C Head

*
Joined: 30 Sep, 2008
Posts: 1


My Contributions


Ive made a flash site that if the user dont have the plugin or is out of date it redirects the page to a html version.
but
• is there a way of getting it to auto re-direct and pauses on the html pages for 10 seconds then moves on to the next

• is there a way of getting the browser to pr-load images into the cache before viewing the html pages

• how do you get loading images to load in stages / ie you can see a low res as the images is downloading

this is the redirect code im using now
CODE
if (pluginlist.indexOf("Flash")==-1) {
location.replace("None_flash_page.html");
}
User is offlineProfile CardPM

Go to the top of the page

BetaWar
post 30 Sep, 2008 - 04:39 AM
Post #2


#include <soul.h>

Group Icon
Joined: 7 Sep, 2006
Posts: 1,983



Thanked 78 times

Dream Kudos: 1175
My Contributions


The easiest way to do what you are talking about is to place all the code you want the user to see in a single HTML file that has javascript simply change what is visible at the time, that way you won't have to worry about loading additional pages every so often.

To do something with a pause between the times it fires off you could use setTimeout

Which could be set up like so:
CODE

function move(){
  window.location = "http://www.google.com";
}
setTimeout(move, 10000);


However this code would need to be on each page you are wanting to use it on (or in a js file that is included in each of the pages).

Another reason to look into using everything in the single page is so that the images can be pre-loading as the timeout is waiting to fire, however javascript can do actual preloading as well.

To show a low res image as it is downloading to the browser you just have to save as .jpeg (I believe) and when you save it, depending on the image editing program (I believe fireworks has this ability, maybe Gimp or PS also) you save it with progressive download enabled.

Hope that helps.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/22/08 02:16AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month