WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Versioning files (2 posts)

  1. Cor van Noorloos
    Member
    Posted 3 years ago #

    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?

  2. Cor van Noorloos
    Member
    Posted 3 years ago #

    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" />

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.