Forum Moderators: open

Message Too Old, No Replies

Getting rid of spaces in your html code

Does anyone know of a good program for the above problem

         

mikeD

5:54 pm on Apr 9, 2002 (gmt 0)

10+ Year Member



I am hoping to make my html harder to read after having code copyed by a few competitors

brotherhood of LAN

6:08 pm on Apr 9, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Wordpad

Copy your HTML into wordpad

go to FILE > REPLACE

replace two spaces with no spaces, click replace all

if you want to make it even harder to read the HTML delete all line breaks. You may also be thinking about using CSS and as much use of external files as possible so that when the page is saved people cannot rip the pages off one by one

toadhall

6:12 pm on Apr 9, 2002 (gmt 0)

10+ Year Member



A good quality text editor will do the trick. See:
[webmasterworld.com ]
(I'm partial to Editplus. I believe 'remove spaces' is under Edit - I don't have access to my toolbox right now so can't be sure.)

hasbeen

6:12 pm on Apr 9, 2002 (gmt 0)

10+ Year Member



Can't they, though, in IE do a "save as complete web page" and get everything (graphics, stylesheets, etc.)?

<backpedaling>
Uhh...I'VE never done it, but a friend told me you could.
</backpedaling>

mikeD

6:15 pm on Apr 9, 2002 (gmt 0)

10+ Year Member



thanks brotherhood_of_LAN but with over 270 pages at the moment and more to come, that could take a while.

buckworks

6:25 pm on Apr 9, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



<<replace two spaces with no spaces, click replace all >>

Be careful here, because if you had any places where there two spaces between words in your text, the words would end up running together. It would be safer to replace two spaces with one space, and do several passes.

This won't protect your code from being "borrowed", but it does reduce code bloat a bit to make your pages download faster.

pageoneresults

6:25 pm on Apr 9, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



>thanks brotherhood_of_LAN but with over 270 pages at the moment and more to come, that could take a while.

Not really! I can download a 270 page site in less than five minutes through my FP import feature. And, it will grab most, if not all, of the supporting files with the exception of anything that is within a javascript link like rollover images.

pageoneresults

6:28 pm on Apr 9, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



>Be careful here, because if you had any places where there two spaces between words in your text, the words would end up running together. It would be safer to replace two spaces with one space, and do several passes.

Hmmm, I was waiting for that one to come up. Using two spaces between sentences is a carry over from the days when we had nothing but monospaced fonts to work with. Monospaced meaning the space between each font character is the same, including punctuation.

When I have clients provide me with content, I give them a set of instructions to follow for when they are setting it up. Part of those instructions tell them not to use double spaces between sentences.

Removing that extra space between sentences is a good move as it is one more byte of information that does not need to be there. Unless of course your site utilizes a monospaced font like Courier than the double spaces between sentences are mandatory!

Laisha

6:29 pm on Apr 9, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



with over 270 pages at the moment and more to come, that could take a while.

Not really. A site ripper will do the job easily. Listen, if someone wants to steal, they're going to steal from you. Sure you can make it more difficult, but the bottom line is that locks don't keep burglars out.

Unfortunately, the most effective defense against thievery, copyright infringement, plagarism, etc., is a good attorney and your own vigilence. :(

toadhall

6:39 pm on Apr 9, 2002 (gmt 0)

10+ Year Member



...for those who are tired of scrolling through hundreds of lines of HTML to find that one section of code that does what you want, search no more! Simply highlight the area of Web page that you want to see the source for, right-click on it and select View Partial Source.

Agreed Laisha. Especially with tools like these floating around.

AlbinoRhyno

10:38 pm on Apr 9, 2002 (gmt 0)

10+ Year Member



It would be nice to find a program that can remove and add spacing, depending on if you are local or if you are going to upload... I think this was mentioned in another thread, that FP can do this. For anyone not already using FP, however, you'll get all the FP crap in your dir structure just to use this feature...

<off to play around with Homesite to see if it does this...>

bill

6:52 am on Apr 10, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Haven't tried this lately, but if memory serves, opening one of these space and carriage return-less HTML pages in FP will strip out all of your hard work almost instantly. Unless you specifically tell FP 2K & XP not to touch the HTML formatting it will reformat according to its own rules.

JonB

7:48 am on Apr 10, 2002 (gmt 0)

10+ Year Member



with over 270 pages at the moment and more to come, that could take a while.
----

for this i use ultraedit feature" replace in FILES" - choose directory or files and it will do replacement without opening and displaying all files. Very good feature, i use it often when i make mispelling.

Jon

brotherhood of LAN

8:12 am on Apr 10, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Jon B, ultrareplace? is that in wordpad?

Im just thinking that would be handy. For instance, I applied my first CSS this week, and it involves changing a <body*stuff> tag to <body>

If such software could edit it over many files without and do it all by itself i wanna know about it!!! Makes replacing stuff a breeze

chris_f

8:21 am on Apr 10, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<<replace two spaces with no spaces, click replace all>>

Do this in HomeSite and you can select it does every page in your site by using the extended replace. It's also alot quicker.

JonB

8:22 am on Apr 10, 2002 (gmt 0)

10+ Year Member



BOL: no,not wordpad but ultraedit. UltraEdit as software, not feature :) my English, i know. So this feature is in UltraEdit software editor. This feature saves me a LOT of work. especially what i like is for example when i have to remove certain longer code - i jsut copy this code to "find" field and replace it with single space.

for your case (body) this feature would work great!

Jon