Bug Tracker

Opened 9 years ago

Last modified 9 years ago

#11249 closed bug

CSP error in Chrome 18 when loading jQuery 1.7.1 — at Initial Version

Reported by: adblockforchrome Owned by:
Priority: low Milestone: 1.8
Component: support Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:


jQuery version 1.7.1 Chrome version 18.0.1003.1


  1. Load in Chrome the extension that is attached to this post (unzip the .zip then drag the .crx onto Chrome).
  2. Open the Web Inspector Console on the page that appears.

Expected results: No errors. The page does nothing but load jQuery.

Actual results: 5 "Refused to apply inline style because of Content-Security-Policy." errors.


You can unzip the attachment and drag the .crx onto Chrome to install it. Here is the contents of the extension. The important part is that manifest.json enables CSP, and page.html includes jQuery.


  "name": "jQuery CSP fail",
  "version": "1",
  "permissions": [ "http://*/*", "https://*/*" ],
  "content_security_policy": "default-src 'self'",
  "background_page": "background.html"


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




<!DOCTYPE html>
  <head><script src="jquery.min.js"></script></head>
    Open the Web Inspector console to see the jQuery errors.


The minified jQuery 1.7.1 code.

Change History (0)

Note: See TracTickets for help on using tickets.