Posts

Showing posts from May, 2007

HOW TO disable automatic META tag refresh/redirect through your browser

What may be a feature in a web application to some, may be intrusive or offending to others. For instance, the timed redirect/refresh using the META tag feature may sometimes be a hindrance . Browsers are supposed to allow users to control all timeouts , but Firefox 2 and lower do not provide a way to control timed redirects . Opera & IE allow you to control it. This post by Ben Buchanan shows how to disable meta refresh : * Opera : browse to opera:config#UserPrefs|ClientRefresh, then de-select the option and restart Opera OR you can go to Preferences > Advanced > Network and unchecked "Enable automatic redirection" * Firefox : you can wait for version three, or install the Web Developer's Toolbar and click Disable > Disable Meta Redirects. OR use the Firefox extension RefreshBlocker to blacklist or whitelist web-sites which have redirect/refresh implemented with the META tag . I tested it on Firefox 2 and it worked fine for me. * In Internet Exp

HOW TO make a website accessible even when "www." is not appended before the domain name

A newbie who has deployed a website on to the Web may have panicky moments, when he notices that his website works when the URL is typed as www.mysupercoolsite.com but is not accessible when the URL is typed as http://mysupercoolsite.com Jeff on the ASP.NET Forums has an answer - " This has nothing to do with HTTP, or ASP.NET or even IIS. The difference is you used the www host in front of your domain, and your DNS is configured to resolve the www host to the IP address of your web site. If you configure a blank host record to point to the same IP, your request will work without the www. See a DNS support group or your DNS admin if you need help configuring this. "

HOW TO programatically find which tables are dependent on a specified table in SQL Server 2005

This was my take on the question that came up on a forum - SELECT so.name FROM sysobjects so INNER JOIN sysreferences sr ON so.id = sr.rkeyid WHERE (so.type = 'U') AND (sr.fkeyid = OBJECT_ID('employee')) Replace the table name used in the OBJECT_ID function with the appropriate name OBJECT_ID is a metadata (scalar) function that returns the database object identification number. fkeyid column of sysreferences returns ID of the referencing table rkeyid column of sysreferences returns ID of the referenced table sysreferences system table contains mappings of FOREIGN KEY constraint definitions to the referenced columns. sysobjects system table contains one row for each object (constraint, default, log, rule, stored procedure, and so on) created within a database. The type column specifies the Object type. We use 'U' to refer to a User table The simpler way of course is to right-click the table in SQL Server 2005 Management S

HOW TO find from which search engine and with what search keywords visitors to your website are coming

Knowing what visitors to your website did last summer may not be easy but it is easy to find with a little programming from which search engine they have come and with what search keywords. If you are looking for help on let's say "xsl recursion" and land on an IBM Developer knowledgebase article through Google , you will notice a hyperlink on the page - " More dW content related to: xsl recursion " that will lead you to its search page showing other relevant pages. The detection & dynamic generation of the hyperlink on the client side is done by a nifty piece of Javascript (which you can view through your browser with the menu option View > Source) You can also detect this with ASP.NET using the Uri Class properties on the URL Referrer. Both Google and MSN Search engines use the the query string variable "q" to hold the keywords submitted by the user while Yahoo Search engine uses "p"?! After you have hit the Search button, the Goog

Isn't Netscape history?

On page 202 of the MS Press book "MCTS Self-Paced Training Kit (Exam 70-528): Microsoft .NET Framework 2.0 Web-Based Client Development" there is a sentence that goes - " The TreeView can also be populated via client-side script on Internet Explorer 5.0 and later, and on Netscape 6.0 and later. " Netscape 6.0! Isn't that history? (Not quite, did you know Netscape 8 is available as a free download ? A spanking new Netscape Navigator 9 is also on the cards . But that's another story) I found it very odd that the author had to mention Netscape instead of Firefox, the other popular browser doing the rounds. Although some people call Firefox names, many proponents of the Microsoft platform have embraced Firefox (many MS webcasts including Fritz Onion's Essential ASP.NET webcast series have demos featuring Firefox). I think this is a good broad-minded thing & it speaks well of ASP.NET's dependability. That line in the book plunged me into a bout