Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 10-10-2016, 10:45 PM
HTMLBasicTutor's Avatar
HTMLBasicTutor HTMLBasicTutor is offline
Administrator
 
Join Date: 10-29-07
Location: Canada
Posts: 26,707
iTrader: 5 / 100%
ob_gzhander and CR LR Questions

I have 2 questions driving me bonkers:

1. Compression

Added this to pages last year when I built the template for the site last year:
Code:
<? ob_start("ob_gzhandler"); ?>
a) customer made a new page with EW4 and it wasn't viewable. Removing this line it is viewable.

but...

b) the pages she didn't touch which still have this line in them work fine.

I already figured out that you can't use ob_gzhandler with zlib but why aren't all the pages broken??

2. Characters/numbers CR and LF above the DOCTYPE declaration

Could someone tell me what is causing this in the top of the source code when you use Rex Swain's HTTP Viewer (it doesn't matter if item 1 above is in the page or not:
Code:
3f85(CR)(LF) <!DOCTYPE·html>(CR)(LF) <html·lang="en">(CR)(LF) <head>(CR)(LF) <meta·charset="utf-8">(CR)(LF)
Already know that CR = Carriage return and LF = Line feed. What is inserting the top line into the source code Rex Swain's HTTP Viewer gets?

PHP Version 5.5.38 (it's actually a HTML site with PHP being parsed for just 2 lines)
Build Date Jul 30 2016 03:15:43
Registered PHP Streams https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 10-10-2016, 11:30 PM
memodorial's Avatar
memodorial memodorial is offline
Contributing Member
 
Join Date: 10-10-15
Location: Solar System. Planet Earth
Posts: 229
iTrader: 0 / 0%
Quote:
Originally Posted by HTMLBasicTutor View Post
I have 2 questions driving me bonkers:

1. Compression

Added this to pages last year when I built the template for the site last year:
Code:
<? ob_start("ob_gzhandler"); ?>
a) customer made a new page with EW4 and it wasn't viewable. Removing this line it is viewable.

but...

b) the pages she didn't touch which still have this line in them work fine.

I already figured out that you can't use ob_gzhandler with zlib but why aren't all the pages broken??

2. Characters/numbers CR and LF above the DOCTYPE declaration

Could someone tell me what is causing this in the top of the source code when you use Rex Swain's HTTP Viewer (it doesn't matter if item 1 above is in the page or not:
Code:
3f85(CR)(LF) <!DOCTYPE·html>(CR)(LF) <html·lang="en">(CR)(LF) <head>(CR)(LF) <meta·charset="utf-8">(CR)(LF)
Already know that CR = Carriage return and LF = Line feed. What is inserting the top line into the source code Rex Swain's HTTP Viewer gets?

PHP Version 5.5.38 (it's actually a HTML site with PHP being parsed for just 2 lines)
Build Date Jul 30 2016 03:15:43
Registered PHP Streams https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip
1. The best way to enable compression, is by using mod_deflate or mod_gzip. Usually hosting providers enable this and you don't have to do anything.
2. Never heared about 'Rex Swain's HTTP Viewer', but have you tried using different viewer? Because that one can be bugged... For example Google Developers recommended this one:
http://www.whatsmyip.org/http-headers/
Also test your http compression:
http://www.whatsmyip.org/http-compression-test/

Last edited by memodorial; 10-10-2016 at 11:39 PM.
 
Reply With Quote
  #3  
Old 10-11-2016, 12:18 AM
HTMLBasicTutor's Avatar
HTMLBasicTutor HTMLBasicTutor is offline
Administrator
 
Join Date: 10-29-07
Location: Canada
Posts: 26,707
iTrader: 5 / 100%
Quote:
Originally Posted by memodorial View Post
2. Never heared about 'Rex Swain's HTTP Viewer', but have you tried using different viewer? Because that one can be bugged... For example Google Developers recommended this one:
http://www.whatsmyip.org/http-headers/
That gets the headers but doesn't show the source code like Rex Swain's does.
Quote:
Originally Posted by memodorial View Post
Also test your http compression:
http://www.whatsmyip.org/http-compression-test/
With and without the ob_gzhandler are compressed using this but that doesn't explain why the old with ob_gzhandler pages are not crapping out.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PPP questions exclusteve Blogging Forum 0 03-13-2009 01:56 AM
Just a few Questions imgtube Forum Lobby 24 12-18-2006 01:39 AM
SEO Questions KieranTaylor0403 SEO Forum 19 12-07-2006 12:03 PM
My First Questions noob_0001 Google Forum 5 02-17-2005 09:55 PM
VPS Questions? Big Ben Dedicated Servers 9 11-15-2004 09:01 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 12:53 AM.
Powered by vBulletin
Copyright © 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC