April 2005 - Posts

We've had a Javascript error on our forum pages for www.elsevier.nl for quite some time.

So, they asked me to look into it.  The initial Javascript (JS) error said: line3, position 1.
But looking in the source (with IE), it show code at that position that isn't JS...
And it also didn't correspond with the source in iframes we use.
Off course, this is often the problem with JS errors in IE.

In Firefox, JS errors are much easier to track down: the JS console absolutely rules! Problem was: the error didn't show in FireFox :(

Anyway, moving on...
Testing locally, I got the following error:

 

So, after Googling, I was convinced there was a problem with the registration of webUIValidation.js through ASPNET_REGIIS.EXE. But after a lot of trying and testing, I still didn't get it to work...

Finally, I compared the problem with webUIValidation.js on another site, but there it worked just fine. Only difference was: our site makes use of URL rewriting with a ISAPI filter of Helicon. I decided to take a look at our rewriting rules and there I saw:

RewriteRule (.*)\/asp(.*) $1.asp$2 [I]   which means: change /asp into .asp

(we use the ISAPI filter to change rewritten URL's back into standard ASP(X) URL's)

It finally hit me! Because of this rule, the path to the javascript file was also rewritten!

src="/aspnet_client/system_web/1_1_4322/WebUIValidation.js"

became

src=".aspnet_client/system_web/1_1_4322/WebUIValidation.js"

What seemed to be a JavaScript error in the end turned out to be a result of URL rewriting...

AAAAhhhhh!!!!!!!!!

Today, most people surfing the net visit websites, not by directly using the URL, but via Google hits.
That's why SEO, Search Engine Optimization (or Google Optimization) is hot...

So, for sites like www.zibb.nl and www.elsevier.nl (dutch news sites), it is very important that a lot of their articles are indexed by Google and reach a high Google ranking.
On my current project (
www.zibb.nl and www.elsevier.nl), we're putting a lot of effort in trying to get a high ranking in Google.

One way of doing this is URL rewriting, because the Google spider indexes RewrittenURL better than NormalURL
.
S
ince we're using URL rewriting, the page ranking of www.elsevier.nl has reached 8 (out of 10), which is very high! And the number of articles indexed by Google has gone up from about 300 to more than 34.000!! Check out the history of Elsevier at Google!

As you can clearly see, we've released URL rewriting for Elsevier in March.
(Actually, we did two releases, the first in February with the first version of URL rewriting, and again in March with a better version of URL rewriting)

(Wanna try this for youw own site? Goto marketleap.com, click on Search Engine Saturation, enter your URL, type in the Access Code and click Generate Report Then click Trend/History Report and click on the graph. Cool!)

If you're interested in SEO, you might like to read these two articles:
How to Steal to the Top of Google, part 1
How to Steal to the Top of Google, part 2
(Also downloadable as PDF)

New MSDN section: Coding4Fun

 

Read this article on designing .NET Class Libraries....

About a week ago we had a discussion on the Microsoft mailinglist @ LCMG about whether or not to combine several assemblies into one assembly. Maybe this article will help you decide what the best option is for you.

Cheers!