{"action":"created","issue":{"url":"https://api.github.com/repos/hiddentao/gulp-server-livereload/issues/15","repository_url":"https://api.github.com/repos/hiddentao/gulp-server-livereload","labels_url":"https://api.github.com/repos/hiddentao/gulp-server-livereload/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/hiddentao/gulp-server-livereload/issues/15/comments","events_url":"https://api.github.com/repos/hiddentao/gulp-server-livereload/issues/15/events","html_url":"https://github.com/hiddentao/gulp-server-livereload/issues/15","id":92818482,"number":15,"title":"Browser not reloading","user":{"login":"tlkiong","id":5483026,"avatar_url":"https://avatars.githubusercontent.com/u/5483026?v=3","gravatar_id":"","url":"https://api.github.com/users/tlkiong","html_url":"https://github.com/tlkiong","followers_url":"https://api.github.com/users/tlkiong/followers","following_url":"https://api.github.com/users/tlkiong/following{/other_user}","gists_url":"https://api.github.com/users/tlkiong/gists{/gist_id}","starred_url":"https://api.github.com/users/tlkiong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlkiong/subscriptions","organizations_url":"https://api.github.com/users/tlkiong/orgs","repos_url":"https://api.github.com/users/tlkiong/repos","events_url":"https://api.github.com/users/tlkiong/events{/privacy}","received_events_url":"https://api.github.com/users/tlkiong/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hiddentao/gulp-server-livereload/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2015-07-03T08:07:41Z","updated_at":"2016-07-12T03:06:22Z","closed_at":null,"body":"I tried this. Everything is fine except for one minor issue - browser not reloading.\r\n\r\nI installed this through npm.\r\nMy app is a cordova app.\r\nI can launch the browser on the index.html\r\nBut once I change a file and save, the browser does not reload (I am using Google Chrome) but on console, it is logged saying that they detect a file change.\r\nMy gulp task is:\r\n\r\n```javascript\r\ngulp.task('webserver', function() {\r\n  gulp.src('www')\r\n    .pipe(server({\r\n      livereload: true,\r\n      directoryListing: false,\r\n      open: true,\r\n      defaultFile: './index.html'\r\n    }));\r\n});\r\n```\r\n\r\nError received on Chrome's console:\r\n\r\n>Refused to execute inline script because it violates the following Content Security Policy directive: \"default-src 'self' data: gap: content: https://ssl.gstatic.com 'unsafe-eval'\". Either the 'unsafe-inline' keyword, a hash ('sha256-MRj7teD3Lkdf-iLed_8_f4BgaMZi9YYlXhgQR2180fY='), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'script-src' was not explicitly set, so 'default-src' is used as a fallback."},"comment":{"url":"https://api.github.com/repos/hiddentao/gulp-server-livereload/issues/comments/231925685","html_url":"https://github.com/hiddentao/gulp-server-livereload/issues/15#issuecomment-231925685","issue_url":"https://api.github.com/repos/hiddentao/gulp-server-livereload/issues/15","id":231925685,"user":{"login":"hiddentao","id":266594,"avatar_url":"https://avatars.githubusercontent.com/u/266594?v=3","gravatar_id":"","url":"https://api.github.com/users/hiddentao","html_url":"https://github.com/hiddentao","followers_url":"https://api.github.com/users/hiddentao/followers","following_url":"https://api.github.com/users/hiddentao/following{/other_user}","gists_url":"https://api.github.com/users/hiddentao/gists{/gist_id}","starred_url":"https://api.github.com/users/hiddentao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hiddentao/subscriptions","organizations_url":"https://api.github.com/users/hiddentao/orgs","repos_url":"https://api.github.com/users/hiddentao/repos","events_url":"https://api.github.com/users/hiddentao/events{/privacy}","received_events_url":"https://api.github.com/users/hiddentao/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T03:06:22Z","updated_at":"2016-07-12T03:06:22Z","body":"@kentr Good idea. Would you be able to help me test out the following snippet and let me know if it works?\r\n\r\n```js\r\n  app.use(function(req, res, next) {\r\n    res.header(\"Cache-Control\", \"no-cache, no-store, must-revalidate\");\r\n    res.header(\"Pragma\", \"no-cache\");\r\n    res.header(\"Expires\", 0);\r\n\r\n    next();\r\n  });\r\n```\r\n\r\nPlease place it after the `var app = connect();` line.\r\n\r\n(Also, you'll need to make sure dev tools cacheing if turned off to check that it works)."}}
{"actor":{"display_login":"hiddentao"}}