login about faq

Using Puppy Linux 4.3.1, I created some HTML files then uploaded to a web host. I go to the site (still using Puppy Linux) and the HTML pages show with no problems. Then I go to Windows, start a browser (I tried both in Mozilla FF and Opera) and open the same pages and lo and behold, the browser reports server timeout errors (i.e. server is not responding, etc.).

So I go back to my Puppy Linux box, clear the cache of the browser (I'm using Seamonkey 2.0), reload the page and viola, it appears!

What I do next, I delete all the files from the web host, create the HTML files using Windows, re-upload, then it's ok -- it now shows in Windows! Then back to my Linux box, open the page, it also shows properly.

So, is there a difference when creating HTML files in Linux and Windows?

asked Apr 24 '10 at 17:26

riclags's gravatar image

riclags
355217

How did you create the HTML files in Linux and in Windows? Did you do it programatically or did you use a text editor or an IDE?

(Apr 25 '10 at 23:05) Randell ♦♦ Randell's gravatar image

If you did it programatically, it would help if you can show us the relevant code snippet.

(Apr 25 '10 at 23:06) Randell ♦♦ Randell's gravatar image

Well, I don't have the exact code anymore but it was basically f = open('text_file.txt', 'r') then d = f.readlines() then fout = open('html_file.html', 'w') then for item in d fout.write(item). In between those there is the fout.write() of HTML tags i.e. <html>, <head>, etc. I also put a 'n' after every line for HTML source readability. Then fout.close() at the end. Could it be that the 'n' is causing the problem?

(Apr 26 '10 at 00:46) riclags riclags's gravatar image

There is no difference, save for the fact that lines are separated in Windows (and DOS) by CR/LFs (carriage return 0x0D and line feed 0x0A characters) while in UNIX-like OSes lines are separated by LFs (line feed 0x0A characters) only.

It should not pose any difference when it comes to browsers rendering HTML files saved with CR/LFs or just LFs. My take is that the problem you experienced is probably a fluke.

link

answered Apr 26 '10 at 02:57

cruizer's gravatar image

cruizer
1.5k9

I hope it's just a fluke. I'm checking some things right now. Will post any findings here.

(Apr 26 '10 at 06:55) riclags riclags's gravatar image

I have now concluded that there's something wrong with the free hosting site I was trying it out in. I used a different free hosting site and it now works. On with my testing! Thanks for the help guys. If you're wondering and have time in your hands, and want to recreate (if possible), the previous free hosting site I was using was http://freehostia.com.

(Apr 26 '10 at 13:45) riclags riclags's gravatar image

There shouldn't be any. HTML files are just text files which you can create in any environment and should also be viewable in different platforms.

Now how they're rendered is a totally different story since browsers (especially IE) sometimes have their own interpretation of the HTML/CSS specs.

It's a good thing that most major websites are now removing support for IE 6. That used to be the biggest headache for web designers.

Can you share what application you used in Linux to create the file? Maybe it inserted special characters which your windows browser could not decode? Or maybe it was purely coincidence that the server was down when you browsed using Windows. :)

link

answered Apr 25 '10 at 00:09

paul_sns's gravatar image

paul_sns
1.7k116

Hi paul_sns. The application I initially used in Linux was Python -- I wanted to convert text files to HTML form. Thinking that HTML files are basically just text files, as you menioned, I thought I won't get any problems. But, as stated above, I had problems browsing it in a Windows box (using both FF and Opera). So I used Vi (and sometimes Geany text editor) to create the HTML files manually. Still no go.

I'm pretty sure that the server wasn't down because I simultaneously tested in both Linux and Windows.

I also tried in Fedora 12, still no go.

(Apr 25 '10 at 04:33) riclags riclags's gravatar image

Will you be able to provide the HTML generated from Linux which caused the problem? It will be easier to help if we knew what the exact errors were. Thanks.

(Apr 25 '10 at 08:24) paul_sns paul_sns's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×24
×11
×9

Asked: Apr 24 '10 at 17:26

Seen: 1,017 times

Last updated: Apr 26 '10 at 02:57