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
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 08-19-2012, 04:51 PM
snakeair's Avatar
Super Moderator
 
Join Date: 12-31-07
Location: Medford, NJ
Posts: 42,174
iTrader: 3 / 100%
Omit The Protocol" And 7 Other Tips To Write Better Web Code

I'm not a programmar so I got a little headache reading the blog post and seeing code. Maybe a few of you folks can read the blog post and post your comments about the 7 tips mentioned.

Quote:
Omit the protocol portion (http:, https from URLs pointing to images and other media files, style sheets, and scripts unless the respective files are not available over both protocols. Omitting the protocol from embedded resources makes the URL relative and avoids mixed content issues and results in minor file size savings
Continued at: http://www.searchenginepeople.com/bl...code-tips.html

Come to think of this, I would just hire someone who knows this stuff. Your comments are more then welcomed.
__________________
Newbiz Advertising - A resourceful blog

Like us on Facebook: facebook.com/Newbizshop

Premium WordPress Themes - A list of themes.
 
Reply With Quote
  #2 (permalink)  
Old 08-20-2012, 04:09 AM
GMF's Avatar
GMF GMF is online now
Contributing Member
Latest Blog:
None

 
Join Date: 11-03-11
Location: Austria
Posts: 1,186
iTrader: 0 / 0%
Quote:
Avoid Capitalization:
Why? I know that it's not best practice, but I don't see the point. If one does that, so be it.

Doesn't break your website, doesn't safe you bandwidth.

Quote:
Comments:

Remove all unnecessary and unwanted comments from your HTML
An example would be nice. What exactly IS unnecessary and unwanted?

Quote:
Entity Code:

Not Recommended


The currency symbol for the Euro is &eur;.
Recommended


The currency symbol for the Euro is "".
Can someone explain this to me? Doesn't make much sense. Also, it's € not &eur;

Quote:
TYPE Attributes:

...in these contexts is not necessary as HTML5 implies text/css and text/javascript as defaults.
Isn't a big focus of HTML5 to add more semantic meaning? Why would you then omit something that adds it? Even if it's unnecessary?
HTML5 isn't even finished. What if they change that in the future?

It doesn't harm your website, so keep it.

Quote:
General Formatting:
That's your formatting style, not mine.
Also: new lines are 2 bytes big


My suggestion: Read some best practices but see them as recommendations not as strict rules. Use what you are comfortable with. When it makes sense to you, use it.
Don't go byte hunting. It's not really worth the effort, except your site has huge traffic and you need to cut some bandwidth.

My
 
Reply With Quote
  #3 (permalink)  
Old 08-20-2012, 04:46 AM
The Controversial Coder
Latest Blog:
None

 
Join Date: 05-01-06
Location: Manchester; UK
Posts: 2,374
iTrader: 0 / 0%
In regards to omitting the protocol, I thought this was standard for 99% of the web when linking to an internal file, it seems so wrong to use protocols with internal links.

Indentation, using two spaces - yeah don't be so broad Mr. Website, do that with Python and watch stuff happen, Python much of the time requires 4-byte indentation and some of the older stuff requires 8. Don't mix spaces/tabs though.

Avoiding capitalization, nope, I use Hungarian Notation or CamelCase as many programmers do.

It's a bit of a mish-mash article with some good and lots of bad advice in there.
 
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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code for "wide space" in .htm? Longer than " "? davelev Coding Forum 16 02-02-2011 05:28 AM
How to Write "How To" Headlines David Jackson Marketing Forum 0 01-17-2011 10:53 AM
Need to write a code for a calender la cala Coding Forum 6 01-02-2007 07:06 PM


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


All times are GMT -7. The time now is 03:42 AM.
Powered by vBulletin
Copyright © 2000-2013 Jelsoft Enterprises Limited.
Copyright © 2003 - 2013 Escalate Media LP




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.