Tutorial to force CSS changes and “go live” immediately


Sponsored Links






Why we need to Force CSS changes to “go live” immediately? As Web / WordPress designer we are even found some terrible problem. The problem is about internet / proxy cache in our system or ISP (Internet Services Provider) this is terrible bad news, if we develop/designed this site in live server.

Force Reload CSS in WordPress - Cansei Der Se Sexy

Force Reload CSS in WordPress - Cansei Der Se Sexy

One way to solve this is to “version” your CSS file, by adding ?v=123 to the URL in the
to your stylesheet. This is rather a pain to have to do by hand every time, so here is a much better way

That’s what Mark Jaquith said on their blog, so to avoid and Force CSS changes we need to put some code in our style.css, so he we go to do this

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); echo '?' . filemtime( get_stylesheet_directory() . '/style.css'); ?>" type="text/css" media="screen, projection" />

The Second Tricks, is using add_filter method. Just write down this code below on your theme functions.php

add_filter('stylesheet_uri', create_function('$s', 'return $s . "?" . filemtime( get_stylesheet_directory() . "style.css"");'));

So simple right? this simple code added giant impact for cache system, so the proxy cache or whatever it said, will always updated the style.css we the version has been changed.

So what does the filemtime function do? From the PHP website:

This function returns the time when the data blocks of a file were being written to, that is, the time when the content of the file was changed.

We hope today WP Tricks about To Force CSS changes to “go live” immediately useful for you. You can use CSS Cache Buster too to avoid this problem

Photos by Lisa Carpenter (001) 212 962 0060

Subscribe to Full RSS Feed

RSS FeedIf you thing this article useful, please consider subscribing to our RSS Feed or e-mail updates and stay updated with us. You can also follow @WPTricksNet on twitter for latest updates.

About WP Tricks

We are WordPress Family, we collected and writed useful tips and tricks for you WordPress. We share it for you...

Related Tips and Trick from Local Data and on The Net

Removing the WordPress Version Number

Did you know that? By default, WordPress provides your WordPress version in your feeds. If you peak under the hood and look at the source code for any of your WordPress feeds. Near the top of the file, you will … Read More

How To Set HTML editor as the default on WordPress

Like we all know, WordPress has two editor mode, Visual and HTML. Now using WordPress add_filter() we can force WordPress to set HTML Editor as default WordPress Post editor. Let's do it, first open your functions.php your current themes and … Read More

Change Editor Style In WordPress 3.0

WordPress 3.0 introducing another nicely featured. This what we really want it a long time ago. Custom Style on Content Editor. Why this featured important? with this featured, we can show and live preview our content will be in the … Read More

How To Integrate Google Font Directory on WordPress Theme

A Google Font Directory is another services by Google, using Google Font directory will be save more bandwidht and server usage. Many question is how to integrate and Using the Google Font Directory in our WordPress theme. Today I will … Read More

Tutorial Multi-Site option in WordPress 3.0

We now move into WordPress Next Level, the new version WordPress 3.0, there are so many new featured on this version, the most phenomenal featured is enabled or integrated WordPress MU into WordPress 3.0. Before we use Multi-Site on WordPress … Read More

Tutorial Set Default Custom Background in WordPress 3.x

There are a lot of New Features introducing in WordPress 3.x, Custom Background is one of them. Now we will show you How to Set a Default Custom Background in WordPress 3.0. This tutorial original written by Bavotasan that you … Read More

Force CSS changes to “go live” immediately | Mark on WordPress

Post navigation ← Previous Next → Force CSS changes to “go live” immediately and posted tutorial outputs like this href=”http://127.0.0 read more

Source: http://markjaquith.wordpress.com/2009/05/04/force-css-changes-to-go-live-immediately/

sn107w snt107 mail live com - WordPress Tricks & Tips

Tutorial to force CSS changes and “go live” immediately Why we need to Force CSS changes to “go live” immediately? As Web read more

Source: http://wptricks.net/archives/sn107w-snt107-mail-live-com

sn107w.snt107.mail.live.com/default.aspx - WordPress Tricks & Tips

Tutorial to force CSS changes and “go live” immediately Why we need to Force CSS changes to “go live” immediately? As Web read more

Source: http://wptricks.net/archives/sn107w.snt107.mail.live.com/default.aspx?wa=wsignin1.0+%7C+details+

MediaWiki talk:Common.css/Archive 3 - Wikipedia, the free encyclopedia

75 Monobook.css changes; 76 font change; 77 Template normal messagebox.standard-talk, but force Most changes to templates go live immediately: all the appropriate pages are read more

Source: http://en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_3

CSS - How To Information | eHow.com

Unlike animations, CSS transitions animate changes between Cascading style sheets (CSS) lets you create How to Make CSS Go Live Immediately read more

Source: http://www.ehow.com/css/


2 Responses to Tutorial to force CSS changes and “go live” immediately

  1. There was a time when i used to have many problems with caching, but letely i didn’t experienced so many problems.

    A good browser and a good DNS can solve it.

    I’m using Chrome and Firefox as browser and i’ve set my DNS to use Google DNS which is: 8.8.8.8 and alternative 8.8.8.4

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>