4

I'm new to Chrome Extension but I enjoyed it very much. Especially the debugging method: refresh the extension page and it'll reload my updates.

but i recently notice that the script content in my background.html is not updating.

I am using manifest V2 and use this way to load my script

<script src="assets/js/script.js"></script>

but the script is not reloading after I refresh the extension page. I have to change the code in my background.html like this to make it work:

<script src="assets/js/script.js?1"></script>

Any tips for this? Is this a bug for debugging Chrome Extension

AGamePlayer
  • 7,404
  • 19
  • 62
  • 119
  • possible duplicate of [Faster way to modify chrome extension than Remove -> Load unpacked](http://stackoverflow.com/questions/8159273/faster-way-to-modify-chrome-extension-than-remove-load-unpacked) – Evan Carroll Feb 23 '14 at 23:39

1 Answers1

2

Have you used enter image description here reload link here, it will refresh every thing no need to use src="assets/js/script.js?1" at all .. Let me know if it still fails.

Sudarshan
  • 18,140
  • 7
  • 53
  • 61
  • @AwQiruiGuo: What made you think, it is not working.Is it not updating script? – Sudarshan Dec 01 '12 at 10:21
  • Other stuff refreshed but the script content. – AGamePlayer Dec 02 '12 at 00:24
  • @AwQiruiGuo: I'd first check to see whether the page was cached longer than you expected. If a new version of the page itself wasn't downloaded, then it would still be requesting ?1 as the HTML wouldn't have changed. Are you sending long lived cache headers? with the page – Sudarshan Dec 13 '12 at 18:49