Dear Experts, these days I am facing a big problem and its headache for me now. When I made any changes to my css file and upload it. Its not available first time on the site. Everytime ctrl+f5(refresh) button press then the css starts running. What is the solution of this problem? I also deleted the cache from web-server. But same problem. Any solution, much appreciated.
No but this is not my solution. People from around the world open the page and everytime refresh the page to see the changes in css. If someone open the site first time he also suffers the same. Means the css is updated only after pressing refresh button.
<body onLoad="if (location.href.indexOf('reload')==-1) location.replace(location.href+'?reload')"> HTML: If you dont mind using PHP then this may be an option for you. Put this code on the very top of your html page. Rename that page to .php extension. <?php header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header('Last-Modified: '.gmdate('D, d M Y H:i:s') . ' GMT'); header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1 header( 'Cache-Control: post-check=0, pre-check=0', false ); header( 'Pragma: no-cache' ); ?> PHP: These are a couple of solutions that should work.