HTML Compactor

Discussion in 'HTML' started by Jeremy Ross, Mar 10, 2005.

  1. Jeremy Ross

    Jeremy Ross Guest

    Hello,

    I am looking for a program that will compact my HTML, so its all one one
    line, I have seen many of these programs around before but am now unable to
    find one that does this. If anyone knows of one that would be great.

    Thanks,

    Jeremy Ross
     
    Jeremy Ross, Mar 10, 2005
    #1
    1. Advertising

  2. Jeremy Ross wrote:

    > I am looking for a program that will compact my HTML, so its all one one
    > line, I have seen many of these programs around before but am now unable
    > to find one that does this.


    perl -p -e's/\n/\ /' my.html

    .... utterly pointless of course.

    (get Perl from http://www.activestate.com/ if you don't have it already)

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Mar 10, 2005
    #2
    1. Advertising

  3. Jeremy Ross wrote:

    > I am looking for a program that will compact my HTML, so its all one one
    > line


    Why?

    --
    Blinky Linux Registered User 297263
    Who has implemented Usenet Solution #45933:
    Now killing all posts originating at Google Groups
     
    Blinky the Shark, Mar 10, 2005
    #3
  4. Jeremy Ross

    Adrienne Guest

    Gazing into my crystal ball I observed Blinky the Shark
    <> writing in
    news::

    > Jeremy Ross wrote:
    >
    >> I am looking for a program that will compact my HTML, so its all one
    >> one line

    >
    > Why?
    >


    Probably to "hide" it or make it difficult to view source.

    --
    Adrienne Boswell
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne, Mar 10, 2005
    #4
  5. Adrienne wrote:

    >>> I am looking for a program that will compact my HTML, so its all one
    >>> one line


    >> Why?


    > Probably to "hide" it or make it difficult to view source.


    Which is pointless since:
    (a) Good HTML is *very* simple and not worth copying
    and
    (b) HTML Tidy can make it readable again rather quickly

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Mar 10, 2005
    #5
  6. Jeremy Ross

    Toby Inkster Guest

    Jeremy Ross wrote:

    > I am looking for a program that will compact my HTML


    Google: mod_gzip.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Mar 10, 2005
    #6
  7. "Jeremy Ross" <> wrote in message
    news:%60Yd.12169$ZO2.4326@edtnps84...
    > Hello,
    >
    > I am looking for a program that will compact my HTML, so its all one one
    > line, I have seen many of these programs around before but am now unable

    to
    > find one that does this. If anyone knows of one that would be great.


    FWIW, Notetab Lite (free from www.notetab.com) will do this. Use the replace
    function to replace "^p" with nothing and you're done.

    M
     
    Michael Laplante, Mar 10, 2005
    #7
  8. Jeremy Ross wrote:
    > Hello,
    >
    > I am looking for a program that will compact my HTML, so its all one
    > one line, I have seen many of these programs around before but am now
    > unable to find one that does this. If anyone knows of one that would
    > be great.
    >
    > Thanks,


    1st Page 2000 will do it.
    <http://www.evrsoft.com/1stpage2.shtml>


    Richard Brooks.
     
    Richard Brooks, Mar 11, 2005
    #8
  9. Jeremy Ross

    Jeremy Ross Guest

    Hello,

    The real reason for wanting something like this, is because there is a
    program that uses the nl2br function in php, witch creates a <br> tag at
    every new line, now i am placing a table inside this function, witch is
    formated wiht each cell on a new line, so there are loads of <br> tages
    being placed in the code, and the table is moving down many lines because of
    this.

    I need that program to make it all on one line so there are no <br> tags
    being placed.

    Thanks,
    Jeremy





    "David Dorward" <> wrote in message
    news:d0qbjo$bli$1$...
    > Adrienne wrote:
    >
    >>>> I am looking for a program that will compact my HTML, so its all one
    >>>> one line

    >
    >>> Why?

    >
    >> Probably to "hide" it or make it difficult to view source.

    >
    > Which is pointless since:
    > (a) Good HTML is *very* simple and not worth copying
    > and
    > (b) HTML Tidy can make it readable again rather quickly
    >
    > --
    > David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    > Home is where the ~/.bashrc is
     
    Jeremy Ross, Mar 11, 2005
    #9
  10. Jeremy Ross

    Guest

    On Fri, 11 Mar 2005 12:57:18 GMT, "Jeremy Ross" <>
    wrote:

    >I need that program to make it all on one line so there are no <br> tags
    >being placed.


    In that case you don't need compaction, you need to edit the file and delete
    some of the BR tags.

    regards
    Marcus
     
    , Mar 11, 2005
    #10
  11. Jeremy Ross

    Oli Filth Guest

    Jeremy Ross wrote:
    > Hello,
    >
    > The real reason for wanting something like this, is because there is a
    > program that uses the nl2br function in php, witch creates a <br> tag at
    > every new line, now i am placing a table inside this function, witch is
    > formated wiht each cell on a new line, so there are loads of <br> tages
    > being placed in the code, and the table is moving down many lines because of
    > this.
    >
    > I need that program to make it all on one line so there are no <br> tags
    > being placed.
    >


    Or you should stop using the program that's replacing all newlines with
    <br>. Why are you using such a thing?

    --
    Oli
     
    Oli Filth, Mar 11, 2005
    #11
  12. Jeremy Ross

    dorayme Guest

    > From: "Jeremy Ross" <>
    > Newsgroups: alt.html
    > Date: Fri, 11 Mar 2005 12:57:18 GMT
    > Subject: Re: HTML Compactor
    >
    > Hello,
    >
    > The real reason for wanting something like this, is because there is a
    > program that uses the nl2br function in php, witch creates a <br> tag at
    > every new line, now i am placing a table inside this function, witch is
    > formated wiht each cell on a new line, so there are loads of <br> tages
    > being placed in the code, and the table is moving down many lines because of
    > this.
    >
    > I need that program to make it all on one line so there are no <br> tags
    > being placed.
    >
    > Thanks,
    > Jeremy



    You saying you just want to remove some text? Do a global find <br> and
    replace with nothing at all... Using a text editor? Try command F or alt F
    or control F or look up the menus for this function... In mine, for example,
    one can change all instances in docs in a folder, I'm sure you would be able
    to.

    dorayme
     
    dorayme, Mar 11, 2005
    #12
  13. Jeremy Ross

    Sid Ismail Guest

    On Sat, 12 Mar 2005 10:16:04 +1100, dorayme <>
    wrote:

    : > From: "Jeremy Ross" <>
    : > Newsgroups: alt.html
    : > Date: Fri, 11 Mar 2005 12:57:18 GMT
    : > Subject: Re: HTML Compactor
    : >
    : > Hello,
    : >
    : > The real reason for wanting something like this, is because there is a
    : > program that uses the nl2br function in php, witch creates a <br> tag at
    : > every new line, now i am placing a table inside this function, witch is
    : > formated wiht each cell on a new line, so there are loads of <br> tages
    : > being placed in the code, and the table is moving down many lines because of
    : > this.
    : >
    : > I need that program to make it all on one line so there are no <br> tags
    : > being placed\0\0\0: >
    : > Thanks,
    : > Jeremy
    :
    :
    : You saying you just want to remove some text? Do a
     
    Sid Ismail, Mar 12, 2005
    #13
  14. Jeremy Ross

    SpaceGirl Guest

    Jeremy Ross wrote:
    > Hello,
    >
    > I am looking for a program that will compact my HTML, so its all one one
    > line, I have seen many of these programs around before but am now unable to
    > find one that does this. If anyone knows of one that would be great.
    >
    > Thanks,
    >
    > Jeremy Ross
    >
    >


    You have to be careful using programs that do this. Sadly, some browsers
    (ahem, IE) are sensitive to line breaks. Remove line breaks in nested
    tables (for example) can cause "gaps" to appear or disappear.
     
    SpaceGirl, Mar 14, 2005
    #14
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Kamoski
    Replies:
    1
    Views:
    7,157
  2. Adam Akhtar
    Replies:
    9
    Views:
    576
    Florian Gilcher
    Aug 16, 2008
  3. Kyle Schmitt

    ruby compactor/consolidator?

    Kyle Schmitt, Apr 8, 2009, in forum: Ruby
    Replies:
    5
    Views:
    134
    Joel VanderWerf
    Apr 8, 2009
  4. Aaron Gray

    Javascript file compactor wanted

    Aaron Gray, Jan 6, 2007, in forum: Javascript
    Replies:
    5
    Views:
    176
    Aaron Gray
    Jan 6, 2007
  5. Daz
    Replies:
    1
    Views:
    141
Loading...

Share This Page