Jump to content

[SOLVED] "Loading.." shown up when loading a page


robert_gsfame

Recommended Posts

Hi robert_gsfame,

 

It would be better to achieve this result using Javascript.  Have a look at this article which explains how to achieve this result using JQuery.

 

Another very simple option would be to.

 

1.  Create a page called "redirect.html" and add the following code:

 

<p>Please wait while the page loads</p>
<meta http-equiv="refresh" content="5;url=http://www.mydomain.com">

 

2.  Edit your .htaccess file and add the following:

 

DirectoryIndex redirect.html

 

However, this option will always wait 5 seconds, by then the page may not have loaded, or it may have loaded in 2 seconds and the user still has to wait.  It also may effect SEO ratings so I would recommend you investigate the Javascript option as this is dynamic and the loading dialog will clear once the page has finished loading.

 

Hope this helps.

Link to comment
Share on other sites

do you actually "need" it to wait before it continues to the next page, or do you just like the way that looks?  'cause, if you don't actually need to have the user spend 5 seconds waiting, don't bother.

 

but, if you must, use 'meta refresh':

 

<meta http-equiv="refresh" content="5;url=http://www.example.com/page-to-redirect-to.html" />

 

that goes in your <head>...</head>, and then just have whatever text you like on the page.

 

but honestly, if you don't actually need to keep a user waiting, don't.  or at least give them the option to 'click to continue' or something.

 

and if you are referring to "Loading..." as you might see in Gmail or something similar, that because it's actually loading something using AJAX, it's not just for show.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.