The Guide to Slimming Down your Sidebar

Running out of character space in your sidebar? Here's a few tricks you can use to slim down.

  1. Skip http://www.reddit.com.

    Since you're already on reddit.com, you can save yourself 21 characters by removing http://www.reddit.com from your links. Example:

     [reddiquette](http://www.reddit.com/help/reddiquette)
     [reddiquette](/help/reddiquette)
    
  2. Use short links for posts.

    Take advantage of the short-link facilities provided by reddit to save yourself characters on links to reddit posts. For example, these go to the same place:

     [AutoModerator](http://www.reddit.com/r/AutoModerator/comments/q11pu/what_is_automoderator/)
     [AutoModerator](http://redd.it/q11pu)
    

    As it happens, though, we can do even better than that. http://redd.it/<shortlink> and http://www.reddit.com/<shortlink> both go to the same place, so we can save even more characters by combining that knowledge with trick #1 above:

     [AutoModerator](/q11pu)
    

    This lets you link to any thread in 6-7 characters.

  3. Skip the title for comments and posts with parameters.

    If you want to link to a comment from your sidebar, or if you want to link to a post with changed parameters (using ?sort=new, for instance, or ?limit=500 to load extra comments), the above trick won't work. You'll need to use some other tricks to slim down.

    For comments:

    The title portion of a comment link is ignored by the code. You can replace it with whatever you'd like - for instance, an underscore, or the letter "c". That lets you make this change:

     [comment](http://www.reddit.com/r/changelog/comments/10ymie/reddit_change_a_small_rules_reddiquette_reminder/c6i81hk)
     [comment](/r/changelog/comments/10ymie/c/c6i81hk)
    

    For posts with parameters:

    You can safely skip everything after the id32 (the 5 or 6-character code used in the shortlink). You won't be able to use trick #2, though, because the redirect that happens strips away the parameters. The result looks like this:

     [Easy Flair](http://www.reddit.com/r/modhelp/comments/jc7q9/i_made_a_tool_that_makes_it_easier_to_give_users/?sort=new)
     [Easy Flair](/r/modhelp/comments/jc7q9?sort=new)
    

    For both:

    If you don't need your subreddit CSS to be applied, you can save even more characters by skipping your subreddit name in the link:

     [comment](/r/changelog/comments/10ymie/c/c6i81hk)
     [comment](/comments/10ymie/c/c6i81hk)
    
     [Easy Flair](/r/modhelp/comments/jc7q9?sort=new)
     [Easy Flair](/comments/jc7q9?sort=new)
    
  4. Take advantage of autolinking.

    Remember, you can link to subreddits by using /r/<subreddit>, and to user pages by using /u/<username>. That lets you save even the square brackets and parentheses needed to make a link under normal circumstances.

     [/r/modhelp](/r/modhelp)
     [r/modhelp](/r/modhelp)
    
     [qgyh2](/user/qgyh2)
     [u/qgyh2](/u/qgyh2)
    
  5. Use Markdown tricks.

    Linking to the same thing in multiple places on your sidebar? Use this trick built into the Markdown spec. (Markdown is the name of the comment markup used by reddit.)

     [Link #1](/r/modhelp)
     [Link #2](/r/modhelp)
    
     -------------------
    
     [Link #1][tag]
     [Link #2][tag]
    
     . . .
    
     [tag]: [r/modhelp](/r/modhelp)
    

    tag, in this instance, can be any string you'd like, as long or as short as you'd like. The definition line ([tag]: [r/modhelp](/r/modhelp)) should go at the very bottom of your sidebar.


Anyone have any other size-reducing tricks they'd like to share?

Posted Oct 7, 2012, 12:56 AM UTC · edited

3720
Loading comments…