Optimal Use of Default.aspx?

C

clintonG

Just what is the optimal model?

Rather than use default.aspx to return HTML I would like to use default.aspx
to return utlity functions that will determine if cookies are enabled and so
on and then do a redirect to a 'landing page' without being penalized by
search engines who may consider my default.aspx a 'doorway' page.

Using meta refresh is out of the question because Google and other search
engines will penalize and ban because a meta refresh 'might' be misused as a
doorway page and using a meta refresh does not support my need for utility
functions. Instead of a meta refresh SEO sites recommend the use of a "301
moved permanently" in the header of the response:

// Default.aspx
Response.Status = "301 moved permanently";
Response.AddHeader("Location","SomePage.aspx");

The 301 is alleged to be SEO friendly but doing that on the server means to
me there is no way to do any client-side utility functions.

What are your comments about the use of Default.aspx with regard to utility
functions and SEO and how might you redirect without getting penalized or
banned by the search engines?
 
A

ajamrozek

I'm not familiar with search engine penalties for redirects on a
default.htm page; but I'll take your word for it. As for handling
utility functions, you could put them in the Global.asax.vb file.
There's subs already defined for Application start and Session start.
You could probably do a number of things with that, I do.

HTH
alex jamrozek
 
C

clintonG

How do you determine if cookies and JavaScript are enabled using a
global.asax file Alex?

<%= Clinton Gallagher
 
A

ajamrozek

Hmmm...that may be a good question. I'm not sure that you would have a
Page object to work with at that point. There may be an instantiated
object at that point that would give you that information, but I'm not
sure what that is off the top of my head.
Another thought may be to create a custom class that inherits
System.Web.UI.Page and then have pages that you deem necessary inherit
from that class. I think you can just define a New() sub within that
custom class that would have your browser check methods
Public Class Custom_Page
Inherits System.Web.UI.Page

Public Sub New()
[go crazy with objects like {me.Request.Browser}...]

End Sub
End Class

Then say in a default.aspx.vb file have
Public Class _default
Inherits Custom_Page

.....
 
A

ajamrozek

I meant to add that in that New() sub you could have things happen to
redirect the request or whatever else you wanted. Or have a "global"
public variable that's accessible from the calling page (i.e.
default.aspx) that would tell it weather to do something or not.
 
C

clintonG

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top