Solved

best way to redirect users in role to slow loading page

Posted on 2011-09-25
15
265 Views
Last Modified: 2012-05-12
I have a few roles within my web application and although I use master pages, I am currently using a regular aspx form to check roles and then redirect to an htm page which is supposed to show an ajax animation.  
The animation works fine in FF but not in IE.  In addition, this redirecting is real slow and not very appealing.  I would like to use some kind of changing text, and maybe a colored div that slowly moves across the page.  I've seen some examples, moves  but can't figure out how to do it.  
Would this be a faster way of redirecting and if yes, how do I implement, if not what would be the best way to redirect a user to a slow loading page when I also have to deal with roles?

Thanks
0
Comment
Question by:Sheritlw
  • 5
  • 3
  • 3
  • +1
15 Comments
 
LVL 21

Expert Comment

by:Dale Burrell
ID: 36596775
Are you able to speed up the redirection? Doesn't sound right that it takes that long.
0
 

Author Comment

by:Sheritlw
ID: 36596804

I think it takes long because it first has to check multiple roles and then it redirects to an htm page, while on the htm page it has to load some data from the db.
Depending on the internet connection, it can be real slow, so I wanted something that will keep users waiting.
I like the following...http://www.mymatrixfamily.com/ but I don't know how to accomplish this.
Thanks
0
 
LVL 21

Expert Comment

by:Dale Burrell
ID: 36596823
I'd speed it up rather than masking the problem. I suspect your system isn't that large else you would have already mentioned it therefore if its running slow something is wrong somewhere.
0
 

Author Comment

by:Sheritlw
ID: 36596849

Yes, I am aware of some bottlenecks, but what I am looking for is a better way to transition to a slow loading page.  I don't like the way I do it now.
I am looking for some assistance on how to create a better animated transition page.
Thanks
0
 
LVL 25

Expert Comment

by:dgrafx
ID: 36813654
are you saying that even if somene could go through your code with you and find bottlenecks and help you eliminate them so that the page you are speaking of no longer loads slow but loads fast and so you no longer need a transition page - you are not interested - you want to keep the slow loading page and find a better way to transition?
That may sound sarcastic - I'm just wondering though - yes or no?
0
 
LVL 21

Expert Comment

by:Dale Burrell
ID: 36813678
@dgrafx thats the assumption I made :) I can't imagine not being able to optimise that process such speed is not an issue, well I can, I've needed it once, but its a pretty unusual occurrence.
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

Author Comment

by:Sheritlw
ID: 36814652
I definitely want to optimize pages.   I have already replaced the tab container with a list and divs all handled through javascript.  I have also gone through the view state, images, database tables, and other items.
When I started this project more than a year ago, I was just learning asp.net,  I came from the old school of cobol, basic, vb and then vb.net.  I know there is a lot more optimizing to do, but it's  a
just me and I don't know anyone to help, so I keep reading.
So until I can figure out what else I need to do, I need a transition page, especially after a user logs in.
Below is what I am currently working on.
I am hoping someone will help me with this, so I can continue learning and optimizing.

Thanks
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
  <link rel="icon" type="image/png" href="/images2020/ScissorIcon.png" />

    <title>Redirecting</title>
</head>
<body>
<div style="margin:20% 5% 20% 5%; background-color:#fcffce; border:solid 2px Purple;">
<h1 align="center" id="scrollme">Please wait while the page loads your information.</h1>
</div>

<script type="text/javascript">
    /* <![CDATA[ */
    this.focus(); //focus on new window
    redirect = function() {
        var querystring = window.location.search.substring(1); //query string
        var page = querystring.substring(querystring.indexOf('=') + 1, querystring.length);
        function toPage() {
            if (page !== undefined && page.length > 1) {
                document.write('<!--[if !IE]>--> <head><meta http-equiv="REFRESH" content="1;url=' + page + '" /><\/head><!--<![endif]-->');
                document.write(' \n <!--[if IE]>');
                document.write(' \n <script type="text/javascript">');
                document.write(' \n var version = parseInt(navigator.appVersion);');
                document.write(' \n if (version>=4 || window.location.replace) {');
                document.write(' \n window.location.replace("' + page + '");');
                document.write(' \n } else');
                document.write(' \n window.location.href="' + page + '";');
                document.write(' \n  <\/script> <![endif]-->');
            }
       }
        return {
            begin: toPage
        }
     } ();

    scrollMessages(2000);
    redirect.begin();
    /* ]]> */
    var msgIX = 0
    var msgs = new Array(
 "Once a page has loaded the page will load faster next time.",
 "The text you are looking at has changed.",
 "This is a handy way of sending messages to your users."
)

    function scrollMessages(milliseconds) {
       window.setInterval("displayMessage()", milliseconds)
    }
    function displayMessage() {
       if (document.getElementById != null) {
          var heading = document.getElementById("scrollme")
          heading.firstChild.nodeValue = msgs[msgIX]
         
       } else {
          if (navigator.appName == "Microsoft Internet Explorer") {
             var heading = document.all.item("scrollme")
             heading.innerText = msgs[msgIX]
             
            
          }
       }
       ++msgIX
       msgIX %= msgs.length
    }

    
</script>  
</body>
</html>

Open in new window

0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 36906048
0
 

Author Comment

by:Sheritlw
ID: 36914081
Hi,

Thanks for the links.
I would like to do something like http://www.mymatrixfamily.com/
Hairdressers will be using the app, so I really need something bold that keeps them updated.
Do you know how I would do this in asp.net?

Thanks
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 36919426
If you right click on that page, you will notice that its all Flash!
0
 

Author Comment

by:Sheritlw
ID: 36919503
Oh ok,

Well I found out why my site is still so slowwwww.... My server.
I thank you for your help.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 36919521
Glad to help :-)
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now