Friday, April 20, 2012

HTML5, Offline, AppCache, .cache = text/cahce-manifest


Since I started on HTML5, metro and win8. The interesting things are , IndexDB, offline etc. sadly I couldn't find end-end simple how to get offline working. Below I will explain the simplest How to -

1.      Create site. Simple site given by Visual Studio.

2.      Think about the resource you want to cache, since this is simplest; I limited myself to cache one image file.

3.      Create a web application in IIS and set virtual directory.

For this web application set the MIME type

            File type = .cache

            Map to – text/cache-manifest

4.      Go to page where is defined.

5.      Modify this with  

6.      Create a file give the same name as defined in manifest=. So I am giving it simple.cache

Simple.cache should look like –



<> (with extension and relatives ness>>

Since my cache file is simple.cache, and image file I plan to cache is “mylogo.png” (this is stored in root location for site) so the overall file is




Now run your site. Since the server is available it will run without any problem.

Now stop IIS and rerun site. This time the UI is different as it is coming under offline capability.

Now if you are starting IIS again and want to see original site delete cache from bowser setting. Without this, cached version will be displayed for this simple site.


Tuesday, April 17, 2012

Windows 8 - Series 1 (XAML)

Recently I got chance to explore windows8 , windows phone etc. and I felt creating App for windows8 will involve good learning from developer perspective. reasons -
The thought process about UI has to change, its not conventional UI , navigation being changed drastically.
The javascript involves good syntax learning and API learning.
only XAML remains closely same, not exactly same.
The better way to rephrase above is -
XAML UI developers are Metro style app developers
Existing XAML assets and knowledge carry forward
XAML and C++, like peanut butter and chocolate
And Also I figureed out some differences between silverlight and Metro App as well -
Silverlight Application
Silverlight depends on browser to provide networking code
Silverlight sends navigation command to browser..
Silverlight is supported OOB in SharePoint.
Silverlight needs browser to host application and application interacts with browser first.
Navigation is done through XAML pages
Metro App
WinRTrelies on underline system service to provide networking code
WinRTmanages navigation through system commands
SharePoint including HTML5 is supported only on latest browser.
Metro App directly runs on WinRT.
Navigation is done through type, x:Class.
XAML for Windows Runtime currently doesn't support custom markup extensions.
Keep Watching – Now I have content to post J