How to remove “Open” button from File Download Dialog options you get in your browser?


I received one client requirement sometime back asking for removing the “Open” button from the File Download popup you get when you are trying to download any file which cannot be viewed directly on the browser.

Inorder to remove the “Open” button, you can make use of one of the  “meta” tags HTML has given us.

<meta name=”DownloadOptions” content=”noopen”/>

Add this meta tag in your <head> tag and voila…. you can get rid of the”Open” button. See below:

 

Setting screen width for Web sites to be viewed on iPhone


Fixing the width of the page in iPhone to a certain value is not direct. Safari is assuming an 800px width. The best solution to this is just by using the meta tags.

Check the snippet below:

To set the width to the screen width based on the mode he is in, be it landscape or potrait:

<meta name=”viewport” content=”width = device-width” />

To avoid scalability for the user:

<meta name=”viewport” content=”initial-scale=1, user-scalable=false” />

To fix the width to 320px always:

<meta name=”viewport” content=”width=320″>

I would suggest you go ahead with the first two always. In this case, the screen will get a fluid layout on mode change and also browser wont scale your page based on the change. Basically you will get the site as it is.

If you dont give the scalability false, then your site will scale like a picture.

Avoiding CSS Image Flicker issue in IE 6.0


There are two types of flickering when it comes to the background-image CSS attribute and its IE6 support.

  • The first is when the whole image flickers. This one can be solved by the aforementioned workarounds. Here is another nice article:

http://www.fivesevensix.com/studies/ie6flicker/

  • The other one is cursor flickering – when you hover an element with the mouse the cursors changes to hourglass and then goes back to normal immediately. Here is a link on that matter:

http://archivist.incutio.com/viewlist/css-discuss/55515

Some Solutions:

  • One solution which is very simple and effective for all flickers. All you need to do is add a meta info tag to the <head> of your page:

<meta http-equiv=”Page-Enter” content=”Alpha(opacity=100)”/>

  • Adjust your web-server’s cache content settings for the static images being referenced from the CSS file.  This unfortunately requires admin access on the machine with IIS 6 (although not with IIS7, which supports a delegated administration model that allows you to configure these rules in a web.config file within the app).
  • Use ASP.NET to define a handler that dynamically renders images with the appropriate cache content settings set.  This does not require any special configuration on your web-server, and can be done by simply copying a .ashx handler file into your app.

Hope this solves your issue.