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

  • Home
  • SEARCH
  • 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 933377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:49:30+00:00 2026-05-15T20:49:30+00:00

(I only need functionality in Chrome) Context: I’m hacking together a node.js script that

  • 0

(I only need functionality in Chrome)

Context:
I’m hacking together a node.js script that automatically watches the files it serves for changes and then uses a websocket connection to push a message to a control page in the browser that manages the reload of assets. For instance, if an html page has an <img href="foo.jpg" />, the server will watch the jpg and send a message to the page that “foo.jpg” has changed. At this point I use javascript to reload reload the image (src = src+”?cachbust=00002″, or some-such).

Problem:
When a background image changes I loop through the page elements to find any references to the image and reset it with new query string to reload it. To do this I use jquery’s $(...).css("background-image", ...) solution. That works, but when I subsequently change the the value for the url in the css (ie, background: url(foo.jpg); => background: url(bar.jpg)), the background-img value doesn’t change.

For css changes, my script reloads the linked stylesheet. My suspicion is that the value I assigned via javascript is taking precedence over the value the css rule in the linked stylesheet ala an inline style attribute.

Question:
Is there anyway to force Chrome to recalculate and apply the value from the external stylesheet and apply to elements that have had styles assigned by jquery’s $(...).css("...","...") functionality?

Thanks everybody.

  • 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-05-15T20:49:31+00:00Added an answer on May 15, 2026 at 8:49 pm

    For css changes, my script reloads the linked stylesheet. My suspicion is that the value I assigned via javascript is taking precedence over the value the css rule in the linked stylesheet ala an inline style attribute.

    That’s exactly right. Setting CSS via jQuery like that has the same effect as putting a “style” attribute on an element (which in fact it does do). That overrides something picked up via selector in the CSS.

    You should be able to un-set the local style on the elements with

    $(...).css("background-image", "");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 507k
  • Answers 507k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Look for "Bundle display name" inside your application info.plist. May 16, 2026 at 4:04 pm
  • Editorial Team
    Editorial Team added an answer Consider this code: %# here you have your data X/Y/..… May 16, 2026 at 4:04 pm
  • Editorial Team
    Editorial Team added an answer (Undeleting this as per discussion above...) I'm not sure whether… May 16, 2026 at 4:04 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I need to implement iphone streaming functionality for WMA audio files from the server.
I'm faced with a situation that I think can only be solved by using
How do you verify an array contains only values that are integers? I'd like
I need some combined functionality regarding drag'n'drop between two trees in ExtJS . The
I'm developing a grid with excel-like functionality using the telerik controls. For example users
So added gears functionality into my Mobi Engine, but there is a wierd behavior
In an application I write that uses a large HTML table of numbers the
We have an application with legacy code that relies on prototype, but we've found
I am looking for a PHP parser that can do this. {tag} Replace the
Some people have mentioned RockScroll and MetaScroll in This Question , but those only

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.