Solved

The Thin Long Line! :)

Posted on 2000-04-13
9
136 Views
Last Modified: 2010-04-09
Hi...
I wanted to ask about the benifits i (webmaster) get from putting all the html code in one looooong line!
Sometimes, when i visit a site, and lookk for the source i find that its compiled in one very long line!
Qestions:
**what are the benifits for me?
**does this effect the download time?  increase/decrease the download time?
**how can i do this with my source? any programs that does this for ready pages?
** does this effect the view (layout) of the page?
Thanks
0
Comment
Question by:windowsssss
  • 2
  • 2
  • 2
  • +3
9 Comments
 
LVL 1

Expert Comment

by:ManoloMA
ID: 2711212
The size of the page is less and then the download time minor.
0
 
LVL 2

Expert Comment

by:burntout
ID: 2711262
There are no benifits....
This is probaly because of the editer they used, or source was crated with a script and they did not add line breaks
0
 

Author Comment

by:windowsssss
ID: 2711283
forgot to tell you, that this method may be ideal if you don't want someone to steal your code! it is REALY discourging to find that you are about to copy a very long line of code!

any effects on the layout of the page?
0
 
LVL 1

Expert Comment

by:hkmdj
ID: 2711721
This is usually the result of a page that wasn't written in straight html but generated by asp or php or cf.  It takes extra time to put in special characters to include carriage returns and tabs while spitting out html.  In ASP, one might use vbCrLf to get the carriage return/linefeed while in PHP someone may put in Chr(13)Chr(10) to have it insert a carriage return linefeed.

I would be interested in whether the extension on the page was html based or server language based.

I agree that it makes it harder for someone to steal code, while they still can steal it, there is extra work involved.

However, it is bad form as an HTML writer to have code that is unreadable.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 8

Expert Comment

by:jbirk
ID: 2711850
I agree with hkmdj.  It is most likely output from some program.  Using perl with cgi is the same way.  It takes extra code to output those eol's, and since it wouldn't normally have any effect on the layout of the page they skip it (I don't however).

Also, it can reduce download time.  I've seen some pages that go to the other extreme and have WAY too much white space in their file and takes an extra minute just to download all the garbage html.  So to decrease download is also a possiblity, but it's not a very good idea, since then you either have to either keep a copy of the original file (making it necesary to have two files for every page on your site), or you have to try and update an unreadable page...

Basically, it's not usually a good idea...

-Josh
0
 

Expert Comment

by:jimmyontour
ID: 2712078
1)
The purpose of doing using this technique is to reduce the amount of spaces, tabs, carriage returns in the source file. This reduces the file size and hence the download time.
(As mentioned: it may also be the result of a CGI program generating HTML without newlines, etc.)
2)
There are programs that do strip out white space in your source (sorry don't know what they are called off-hand).
3)
Depending on the contents of your HTML document, it can affect the layout of the page, but in many cases won't.
Having the <pre> tag will seriously affect the layout.
So too will conversions like:
<table>...</table>
<table>...</table>
being converted to
<table>...</table><table>...</table>
(Likewise for other Document Objects.)
0
 
LVL 2

Accepted Solution

by:
burntout earned 39 total points
ID: 2713798
so basically, 3 people have said the same thing that I said. It was created by a script. Jimmy, Why would you answer a question with the same answer that 3 other people have used?
0
 
LVL 8

Expert Comment

by:jbirk
ID: 2713919
That's what I was wondering...
0
 

Author Comment

by:windowsssss
ID: 2720619
Thanks for the answer.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
spacing 5 56
Tags from access to excel 3 27
Set email body to html using vbscript 6 24
send keys not working in vba 7 38
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now