Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8690333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:52:49+00:00 2026-06-12T23:52:49+00:00

can someone explain what is the difference in accessing CSS in browser by putting

  • 0

can someone explain what is the difference in accessing CSS in browser by putting question mark ? in the end and why the new CSS is not making any affects on Website.

I have deployed a new CSS on web server but its not making any affect.

I tried to open the URL in browser as below:

www.mysite.com/styles/css/main.css

and it loads the older version of CSS.

Then I tried it as below and it loads the new version of CSS.

www.mysite.com/styles/css/main.css?

After doing all this. New CSS change does not affecting the website. Its still displaying the old design.

Kind Regards

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T23:52:50+00:00Added an answer on June 12, 2026 at 11:52 pm

    You need to add something after the ? then change it when you change the CSS. What is happening is a browser will cache anything that doesn’t change for a specific period, it does that by checking file names. so main.css? is still main.css? Anything after the question mark is a query string, generally it’s used to pass data to a particular file. In this case it’s just used to change the file string so the browser will update it every time it changes without affecting the file itself.

    There are a couple of ways you can handle this, the first is manually changing the version, probably the easiest idea if you have a single header file, as in a template system that always loads the same head data.

    <link rel="stylesheet" type="text/css" href="assets/css/main.css?ver1/>
    

    Then on next change:

    <link rel="stylesheet" type="text/css" href="assets/css/main.css?ver2/>
    

    If you’d rather do it automatically you can add a bit of PHP script to the css line like this:

     <link rel="stylesheet" type="text/css" href="assets/css/main.css?time=<?php echo filemtime('./assets/css/main.css');?>" />
    

    This is essentially adding a value that changes every time you save the file and results in something like this, the next time I save the file that time= value will change:

    <link rel="stylesheet" type="text/css" href="http://localhost/refficient/trunk/assets/css/main.css?time=1350305706" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone explain the difference for these two CSS selectors? .work-container . h3 {
Can someone explain the difference between IN and EXISTS and NOT IN and NOT
Can someone explain the difference between 'block' and 'inline-block' for the CSS display setting?
Can someone explain in simple terms the difference between the two? I'm not fully
Can someone explain the difference between these two, the first one is taken from
Can someone explain the difference between apache mod_wsgi in daemon mode and django fastcgi
Can someone explain the difference between static NSString* CellIdentifier = @Cell; and NSString *CellIdentifier
CWM is data modeling UML is object modeling. Can someone explain the difference that
Can someone please explain to me difference between extends and super in java generics
Can someone explain this to me? In particular the difference between: http://github.com/whymirror/greg and http://piumarta.com/software/peg/

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.