Support » Themes and Templates » Versioning files

  • Resolved  

    (@cor-van-noorloos)


    The WordPress.org mainpage gives me a great example

    <style type="text/css">
    @import url("http://s.wordpress.org/style/wp4.css?2");
    </style>
    <link rel="shortcut icon" href="http://s.wordpress.org/favicon.ico?3" type="image/x-icon" />

    Or at the GetShopped.org mainpage

    <link rel='stylesheet' id='wpsc-theme-css-css'  href='http://getshopped.org/wp-content/uploads/wpsc/themes/getshopped/getshopped.css?ver=3.7.42' type='text/css' media='all' />
    <link rel='stylesheet' id='wpsc-theme-css-compatibility-css'  href='http://getshopped.org/wp-content/plugins/trunk/themes/compatibility.css?ver=3.7.42' type='text/css' media='all' />

    As I’m trying to differentiate static components from dynamic components http://developer.yahoo.com/performance/rules.html#expires I wondered how this would be accomplished best?

Viewing 1 replies (of 1 total)
  •  

    (@cor-van-noorloos)

    After some digging it’s as easy as it looks like.
    Just add ?2 or ?ver=3.7.42 when something has been changed.

    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>?1" />

Viewing 1 replies (of 1 total)
  • The topic ‘Versioning files’ is closed to new replies.