Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

defer_js blank screen when no body is present #1325

Closed
jeffkaufman opened this issue Jun 24, 2016 · 2 comments
Closed

defer_js blank screen when no body is present #1325

jeffkaufman opened this issue Jun 24, 2016 · 2 comments

Comments

@jeffkaufman
Copy link
Contributor

Testing defer_js on a very simple page I see:

example1.js
  document.write("hello ");

example2.js
  document.write("world");

djs.html
  <script src="example1.js"></script>
  <script src="example2.js"></script>

When run normally I see "hello world", as expected. When run with defer_javascript I see a blank screen.

Test it here: http://www.jefftk.com/djs?PageSpeedFilters=defer_javascript

Here are WPT runs for Chrome, FF, and Safari showing the same thing:

If I add a <body> tag it works as expected and writes out "hello world".

@jeffkaufman
Copy link
Contributor Author

Moved from #1054

@jeffkaufman
Copy link
Contributor Author

I think this is not a problem in practice, since it only affects tiny demo pages. If we see this causing problems elsewhere we should reopen.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant