NAstyed has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I have a question:

In order to make my pages thinner, i've used HTML::Clean with success (making them 40% less the original size!), but im having problems when it run it into ASP pages (it removes some < % % > tags, and without those it's impossible to run), can someone suggest me another way to do this? is my Latinamerican underground music site, check it out!

Replies are listed 'Best First'.
Re: Problem with HTML::Clean
by Hero Zzyzzx (Curate) on Feb 01, 2002 at 20:11 UTC

    I wouldn't use HTML::Clean on pre-parsed pages. That's your solution. I don't believe it was written to take php/asp style tags into account, only to parse either straight HTML or parsed HTML right before being output from a script.

    How are you configuring HTML::Clean in your script (code please)? You can set varying "levels" and whether or not it should strip comments, which may or may not help you.

    Update: Not that I particularly care (obviously I care enough to post this), but why would this node lose experience (2 votes against it, at -1 when I wrote this)? I use HTML::Clean pretty extensively, and it's not made for the weirdo tags that ASP and PHP use. What isn't helpful about this?

    -Any sufficiently advanced technology is
    indistinguishable from doubletalk.

      Dunno.. I also got downvoted when I wasn't trying to be nasty, only (admittedly very weakly) funny. I've noted that humour doesn't do very well in the monestary, with few exceptions. Maybe some monks considered your post to be negative... who knows.
Re: Problem with HTML::Clean
by trs80 (Priest) on Feb 01, 2002 at 23:08 UTC
    I am not completely sure which type of ASP (Apache,VB,etc) pages you are referring to how, or more correctly when you are processing the pages, you are using HTML::Clean.
    If you are using HTML::Clean with Apache::ASP there are specific guidelines in the documentation on how to it in conjunction.
    If you are running it prior to compile in none Apahce::ASP environment then I would suggest looking into a using HTML::Clean at a different phase in the processing of your outgoing content.
    If you post some more details about your environment I might be able to provide more help.
Re: Re: Problem with HTML::Clean
by IlyaM (Parson) on Feb 02, 2002 at 02:19 UTC