Archive for the ‘Web Development’ Category

http://www.gonzoblog.nl/2012/03/21/10-testing-tools-for-responsive-web-design/

Interesting ones …

Use http://responsivepx.com/ for all browsers

or

http://www.jamus.co.uk/demos/rwd-demonstrations/

or

use resize option with web developer plug-in for FF / Chrome

or resolution test chrome plug-in

https://chrome.google.com/webstore/detail/resolution-test/idhfcdbheobinplaamokffboaccidbal?hl=en-US

http://www.codeproject.com/Articles/10240/Detecting-Page-Refresh
http://msdn.microsoft.com/en-us/library/ms379557%28VS.80%29.aspx#bedrockas_topic2

Thx to my colleague who provided these links.

http://stackoverflow.com/questions/3803901/how-can-i-programmaticaly-disable-ie-compatibility-mode

http://stackoverflow.com/questions/6546775/how-to-forcefully-set-ies-compatibility-mode-off-from-the-server-side

http://blogs.msdn.com/b/ie/archive/2009/02/16/just-the-facts-recap-of-compatibility-view.aspx

 

<head>
<meta http-equiv=”X-UA-Compatible” content=”IE=Edge” />
</head>

<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name=”X-UA-Compatible” value=”IE=Edge” />
</customHeaders>
</httpProtocol>
</system.webServer>

 

http://blogs.msdn.com/b/tmarq/archive/2010/04/01/asp-net-4-0-enables-routing-of-extensionless-urls-without-impacting-static-requests.aspx

http://www.sencha.com/

http://docs.sencha.com/ext-js/4-0/#/guide/getting_started

http://dev.sencha.com/deploy/ext-4.0.7-gpl/examples/

In IE/Firefox we can use window.showModalDialog to show modal popup window. 
Use window.returnValue in the popup window to pass the selections to parent window.
Main Page Code ...
<script type="text/javascript">
    function ModalPopup() {
        var retValue = window.showModalDialog('popup.htm', 'height=200,width=150');
        alert(retValue);
    }
    </script>
    <a href="#" onclick='javascript:ModalPopup()'>Click</a>
Popup Window Code ...
<script>
        function dosubmit() {
            window.returnValue = document.getElementById("txtName").value;
            window.close();
        }
    </script>
    <a href='#' onclick='javascript:dosubmit()'>Close</a>
    <input value="hi" type="text" id="txtName" />
But this showModalDialog has disadvantages like it will not work in Chrome and some other browsers and also test automation of UI using Selenium software will not.
Refer the below links for solution on Selenium issue ...
http://seleniumdeal.blogspot.com/2009/01/handling-modal-window-with-selenium.html
http://seleniumdeal.blogspot.com/2010/04/working-with-modal-dialogs-and-selenium.html

http://www.codeproject.com/KB/ajax/IntroAjaxASPNET.aspx

ASP.NET callbacks for AJAX using ICallbackEventHandler interface, AJAX Pro (http://ajaxpro.codeplex.com/) some interesting techniques which are good to know even though we have some latest and simple AJAX techniques like JQuery AJAX.

log4net – logging info/warning/errors in your aplication to a log file or to the database (sql server, oracle, DB2, MS Access  ) or to send it in a email or to show it as a message on your machine or to write to a event log …

Web Developers are following lot of techniques to speed up web page performance. Images are part of any modern webpage which gives good appearance at the cost of page performance.

Following are the few techniques that many uses now a days …

  1. Using sprites + css to avoid many images/http calls to single image/sing http call (SpriteME tool helps you to create sprites for you)
  2. Using efficent image formats instead of jpg, bmp. gif, png are lighter formats
  3. Storing images in cdn servers
  4. Avoid duplicate images across site pages and few more …

Base64 images using Data URL Scheme is another technique to reduce extra http calls to server.

Advantages

  1. Provides a way to include data in-line in web page itself
  2. It can be used with js, css & image files
  3. It saves extra http calls to server.
    Ex: if a web page needs 2 js fiels, 2 css files and 5 images then its like 9 http calls to server along with 1 call for web page itself i.e. total 10 calls.
    With Data URL format/Base64 you can just have 1 http call that is meant for web page which intern has all js, css and image information.

Take your best decision about using this as some image formats will take more size when representing in Base64 format. I tested with gif of 2KB changed to 3kb of Base64 string and 12kb of png file changed to 3kb of Base64 string. So it is important to use the right image format before applying Base64 logic as it saves extra http call but it will increase the network data size if we don’t use proper image format.

References:

  1. http://www.greywyvern.com/code/php/binary2base64
  2. http://en.wikipedia.org/wiki/Data_URI_scheme
  3. http://stackoverflow.com/questions/4881186/convert-image-to-base64-and-check-size – for C# code
  4. base64_encode, base64_decode functions in PHP

Do you know the difference between HTML & XHTML? Briefly saying XHTML is a combination of HTML + XML (in terms of rules that a  XML document follows).

Use the following validator link to validate whether your html document or page’s view source or web page URL is a well-formed document or not …

http://validator.w3.org/ 

Most of the browsers supports XHTML and it is important to understand XHTML especially when we build web pages targeting multiple browsers