Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to stop Vis. Interdev from putting Height=x Width=x?

Status
Not open for further replies.

jsteph

Technical User
Oct 24, 2002
2,562
US
Hi all,
I have html pages with Img tags. I very specifically do NOT want to control height/width by hardcoding Height=x Width=x. Yet every time I open this page in VI, it writes these values to my code!

I am opening in *Source*, not "Design" or "QuickView".

Is there a way in Preferences to tell MS: "Thanks, but I'll write my own code if you don't mind!".

I like VI for many other reasons, but I don't want it changing code that I've already written. I've gone and done a Find/Replace but MS overwrites this whenever I open it.

How can I stop this monumentally annoying practice??
Thanks,
--Jim
 
Ok...I found some info for this question after deep digging, so the below is for anyone coming across this post looking for an answer:

Micrsoft has confirmed this is an issue with Front Page extensions, apparently it was done because the feeling was that if there is *no* Width x Height attribute, the client browser has to download the images first and then calc the layout for the img tag.

This is true that it will affect performance, but there is no way to turn it off if you have a site that dynamically puts different images in that tag. It's my guess that it's slower if the HxW is there but wrong, and then it has to download and re-calc the layout anyway because the hard-coded HxW attributes are for the 'default' images or whatever is in your dev site.

However, it will only do this pre-caclulation if the image actually exists in your environment. I tested by removing the HxW attributes, saving, and reopening. It replaces them. Next I removed the HxW, and removed *some* of the physical jpg's from the images folder, and since VI (or Front Page) had no image to get attributes from, it added the HxW for those images I left in the folder--and it left HxW blank for those with no physical images.
--Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top