Skip to main content

Document

Start from the top

Page DocTypes

Setting your page rendering mode. What is the use of docTypes?
It basically tells the browser which version of html that will be used to render your page.
There are many variation which includes

a) strict
b) loose
c) frameset
d) xhtml1-strict
e) xhtml1-transitional.dtd
f) xhtml1-frameset.dtd
g) declaration for html 3.2 and 2.0

http://htmlhelp.com/tools/validator/doctype.html

Determine your page Layout.

It is crucial to determine your page layout first and then test it with different browser to see if the positioning is correctly done.

Use minimal Table in your page More Div + CSS

There should be only one level table in your page. Putting two level of table is something you might need to consider twice.


For positioning, formatting that the job of CSS

Follow the XHTML convention and apply the final touches to it by using WC3 Validator service
http://validator.w3.org/

CSS should be used to align your text, phase out the use of spacer gifs and

Make your page conform to XHTML

Try to convert all your html into XHTML compliant standard. It's really easy to do. There should be no upper case for example
changed to
, notice the ending class at the back. These are the convention used in XHTML.

Javascript incompatibility list

Use javascript code that complies to standards.

Use the following as compare to:

a) document.getElementById - instead of document.layers (Netscape) or document.all (IE)

There should be a fair fix of javascript implementation in your page. If your browser host an abundance of javascript code then it might slow down the browser.

And most importantly try to explore other tool to help you do you work .....testing hundreds of page is no easy job.

You might want to try this out

http://www.websiteoptimization.com/services/analyze/

Mozilla Web Developer Pack - add on to Mozilla

Firebug - add on in Mozilla

Validator from WC3

Once of my current task right now is to make my existing web page faster by optimizing html, xhtml and css (with the exception of javascript). I really wonder how fast is that gonna get me.

Comments

Popular posts from this blog

Android Programmatically apply style to your view

Applying style to your view (button in this case) dynamically is pretty easy. All you have to do is place the following in your layout folder (res/layout)
Let's call this file : buttonstyle.xml
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" > <shape> <solid android:color="#449def" /> <stroke android:width="1dp" android:color="#2f6699" /> <corners android:radius="3dp" /> <padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" /> </shape> </item> <item> <shape> <gradient android:startColor="#449def" a…

OpenCover code coverage for .Net Core

I know there are many post out there getting code coverage for .dotnetcore. I'm using opencover to address this needs.

In case, you do no want to use opencover and wanted to stick with vs2015 code coverage, you can try to copy Microsoft.VisualStudio.CodeCoverage.Shim.dll from C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Dynamic Code Coverage Tools\coreclr\ and drop it into your project "bin\Debug\netcoreapp1.0" folder.  Please note : you need to be on VS2015 Enterprise to do this. 

To get started, I guess we need to add OpenCover and ReportGenerator for our test projects, as shown in diagram below :-



When nuget packge gets restored, we will have some binaries downloaded to our machine and we going to use this to generate some statistics. I think the biggest issue is to getting those command lines work.

In dotnetcore, we run test project using "dotnet test" (assuming you are in the test project folder - if not please go there)  So we add this …

DataTable does not have AsEnumerable

I have problem locating my AsEnumerable extension method in my DataTabe (System.Data). Thank god for this post by Angel
(http://blogs.msdn.com/angelsb/archive/2007/02/23/does-not-contain-a-definition-for.aspx)

I was able to find this method once i have added reference to the following assembly.

C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll

Try to do a dummy Build and you should be able to get it.