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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is the best way to edit/maintain huge HTML files

Status
Not open for further replies.

mountainbiker

Programmer
Aug 21, 2002
122
GB
I have this massive homepage (over 1000 lines) that has evolved over the years. People have routinely added and delayed things, but were not careful in their work. Therefore, this page contains a lot of tables within table that are not needed, tags that are immediately closed with no content, <tbody> tags, etc. All this extra %&$# cannot help the load speed of the page. In addition, it is a nightmare to maintain. Now, multiple the page 5 times, because they used it as a template for other pages.

Okay, to my question. I desire some tool that code help me pick out the useless or dead code, highlight blocks (e.g., highlight all the code between two tags) of code, etc. We currently use pure Unix vi with no tag highlighting or anything.

I am not sure which will be the quickest solution: rewrite or clean-up.

Your suggestions/comments are always appreciated.
 
There are pieces of software out there that can help identify bits of code which aren't necessary, but by the sounds of things you might want to rewrite the necessary pages. Furthermore, you might want to look at creating these pages in ASP to make maintaining them a bit easier.
 
Hi,

Re-write using ASP as suggested by madhouse above. You will reap the benefits of it being re-written almost instantously.

James
 
Although ASP may be a faster way of cleaning up your pages, be aware that ASP pages can only be hosted on IIS servers (Windows). With all the security problems that Microsoft has had in the last year, I'd much rather keep my pages in a format that can be hosted on any server. (Unix/Linix server software (Apache, namely) has had it's share of security issues but nothing near as bad or as often as IIS.)




There's always a better way...
 
What you say tviman is right, but updating a web site that's hosted on a Unix/Linux server can be something of a task, although there are a number of CGI scripts freely available that can now enable a user to automatically update your web pages. It' a tough choice!! I first started on designing web sites for Unix servers, and used a very cool CGI script that enabled me to update a clients web site via a web browser. However, after I started getting into ASP I found just how much more configurable web sites designed in ASP could be. But then my company runs both a Unix and Windows 2000 server, so we in a position where we can choose which one to use for a client depending on their needs.
 
Can you use CGI?

If I understand you right then this sounds like the perfect solution.
It's a Movable Type blogger System, designed so that you can regularly update pages with news, weblogs etc etc etc.

You need to be able to run CGI scripts and also there's some specific modules you might need to install/get installed on the server to let it run! Cool script though!


É

:: ::
 
Okay, if you're set on ASP, how about breaking down your large page into smaller segments - much like SSI include files. This will at least eliminate redundancy in the file, not to mention the ease of maintenance. (I don't do ASP so don't know if this can be done!)

You mentioned earlier that you thought the page had things like nested tables and other HTML tags that weren't being used. To find these, open the page in a browser, view the source, copy to a text file, then use an HTML editor that uses a formatter to check for things like that.

Lastly, I still think that the Unix way is better. Unix/Linux, etc. isn't nearly as finicky about file types as a windows server is. Also, with Sun's recent announcement to market a Linux desktop that is totally compatible with Windows programs, the push for Linux to gain a bigger share of the desktop market, and the problems with the trust in Microsoft, I'd seriously weigh the benefits of a quick ASP fix over the long term benefits of a more conventional Unix/Linux solution. There's always a better way...
 
Okay, lets get MY question back on track. Does anyone know a tool that highlights start and end tags? I have a page that is pure HTML, and the employer mandates this; therefore, recoding to another web technology such as 100s of our other pages is not an option. Tools like Tidy HTML, ColdFusion Studio, Allaire Home Site, 1st Page, etc. are fine tools, but they are far from perfect...especially in this case. They strip out in appropriate tr/td/table tags, which cause the page not to render in Netscape 4.7. (Netscape is less forgiving than IE.) Basically, if you are familiar with vi, I am looking for a tool that does a shift 5.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top