Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa HTML Easiest method for expiring the css and js headers
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Java Coder
Easiest method for expiring the css and js headers
1 Answer(s)      a year and 3 months ago
Posted in : HTML


Hi,

I have a website with many thousand users visiting per day. I have changes the css file and uploaded it on server. Now some user is getting the old css file. Let's know what could be the easiest method to solve the browser cache issue?

There is not way to tell the users of my site to clear the cache. I need some smart solution.

Thanks


Advertisement
View Answers

October 2, 2013 at 3:30 PM


Hi,

The easiest way is to add the parameter to the css file. Here is example:

Old code:

<link href="/css/my.css"  type="text/css"/>

Modified code:

<link href="/css/my.css?v=1"  type="text/css"/>

Please note down that we have added ?v=1 after the css file name.

Hope above trick will help you.

Thanks



Related Tutorials/Questions & Answers:
Easiest method for expiring the css and js headers
Easiest method for expiring the css and js headers  Hi, I have a website with many thousand users visiting per day. I have changes the css file... what could be the easiest method to solve the browser cache issue
Input / Output in Easiest Method in Java
Input / Output in Easiest Method in Java  How to input from keyboard, both strings and characters and display the result on the screen with the easiest method in Java?   Hi Friend, Try the following code: import
Advertisements
How to change the value of a variable which is set in jsp (by jstl method) by calling the function from js?
How to change the value of a variable which is set in jsp (by jstl method) by calling the function from js?  How to change the value of a variable which is set in jsp (by jstl method) by calling the function from js? I set
CSS
style sheet validates at Note that some warnings may be unavoidable, but your CSS
EXT JS
EXT JS   i want to create a grid in extjs to display data from mysql and if i want to edit the data i must update through extjs only and must update in mysql database. please help me with sample code. thank you
Lightbox JS
Lightbox JS/font>       Lightbox JS is a simple, unobtrusive script used to overlay images on the current page. It`s a snap to setup and works on all modern browsers. Read full
EXT JS
: [ { id: 'AccountNumber', // id assigned so we can apply custom css (e.g. .x-grid
xls to js using javascript
xls to js using javascript  ![how can we convert a xls file in js file using javascript][1
What is Headers and Mime Types ?
What is Headers and Mime Types ?  Headers and Mime Types   Actually PHP‚??s header() is used to send a raw HTTP header. header() must...-headers-and-mime-types
CSS in flex
the StyleManager.loadStyleDeclarations() method in your Flex application. This method loads the CSS-based...CSS in flex  Hi....... Please tell me How can I load CSS style... dynamically loading of CSS file is not supported in flex. you can compile
Request Headers In EL
Request Headers In EL      ..., it also sends the headers with it. All the headers are optional except Content... commonly used headers are: 1) Accept : The MIME types the browser prefers. 2
HTML CSS
HTML CSS  Explain in brief about the term CSS
Working with CSS(CSS Manipulation)
CSS-related properties of elements. .css( ) This method get the CSS... Working with CSS(CSS Manipulation)       Working with CSS(CSS Manipulation
Specific Request Headers in JSP
Specific Request Headers in JSP     ..., it can also sends the headers with it. All the headers are optional except... commonly used headers are: 1) Accept : The MIME types the browser prefers. 2
jtable with table headers - Swing AWT
jtable with table headers  give me java code to create jtable with table headers and by which i can scroll jtable and can retrieve height and width of the table
js,,mysql - JSP-Servlet
js,,mysql  Hi, I want a jsp code for editing,deleting data retrieved from from the mysql database and displayed in a html page .Can anybody provide me a code for including edit and delete options with the following code
CSS Apply
CSS Apply  How can I apply different CSS to my application for background by taking CSS list in Select tag i.e. Combo box. for e.g As in Orkut we select theme & by clicking to apply it changes background theme & color
Configure Js request in Web.xml
Configure Js request in Web.xml  Hi all, I have 1 basic doubt,suppose i have 2 jsp,1 servlet,1 web.xml file.i need to redirect 1 page via servlet with help of web.xml file.Here just i need to redirect to mainCtrl.java
css
css
css
CSS in Flex
CSS in Flex  Hi...... Please tell me How do you use css styles in flex? Thanks  Ans: @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; .button{ font
Easiest way to learn Java
There are various ways to learn Java language but the easiest way to learn Java is online. RoseIndia provides Java courses online that helps beginners to learn the language from the comforts of their home. Every topic and chapter
Help for website development on Angular JS
Help for website development on Angular JS  want to develop a website using angular JS. I am new to the platform or coding on angular JS. Can i update a database column and get that data uploaded on my webpage simultaneosuly
Ext Js form example.
; In this simplified application and easy to learn Ext Js Tutorial I will show you how to develop a form in Ext Js framework. The Ext Js form will take...; framework in shortest possible time. Ext JS provides UI elements for developing web
Java Servlet : Http Request Headers
a request via GET or POST method usually. It can also send a number of headers...Java Servlet : Http Request Headers In this tutorial, you will learn how to Http Request Headers works in java servlet. Http Request Headers : HTTP
Java Servlet : Http Response Headers
Java Servlet : Http Response Headers In this tutorial, you will learn how to Http Response Headers works in java servlet. Http Response Headers : Web server sends response with one or more response headers including the document
calling servlet from JS and return response from servlet to JS
calling servlet from JS and return response from servlet to JS  hello all, I am working on JSP-servlets n MVC.I am facing a problem. on the web..."; response.setContentType("text/plain"); response.getWriter().write(url); in js function
What are the advantages and disadvantages of CSS?
What are the advantages and disadvantages of CSS?  What are the advantages and disadvantages of CSS
Java get Http Headers
Java get Http Headers     ... the Http Headers. Here, we are using the URL class which points the resource... used the class URLConnection. url.openConnection()-  This method of URL
Listing HTTP Headers
Listing HTTP Headers      ... the headers of the HttpServletRequest object. This can be done very easily by using... headers:<br /> <table> <c:forEach var="httpheaders" items
 

 

 

DMCA.com