• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Profiler deletes anything between </body> and </html>

#1
[eluser]dmorin[/eluser]
Enabling the Profiler appears to remove anything between </body> and </html>. This space can be used to load javascript that may not be needed until after the page has loaded and removing it can effect page operations.

Is anyone else seeing this behavior?

#2
[eluser]Colin Williams[/eluser]
Well, the only valid child elements for <html> are <head> and <body>. So, it's a pretty safe and standard assumption the profiler class is making. Should it EXPECT your markup to be invalid? I think not (although it could probably get away with just replacing </body&gtWink

#3
[eluser]dmorin[/eluser]
I completely agree that it's not valid markup. However, I think that your solution of just replacing the </body> will lead to fewer issues down the road for the community.

#4
[eluser]Derek Allard[/eluser]
The danger of only removing </body> is that its much more likely to grab content out of a page. Typically javascript would go above </body> and not beneath it. I'm not sure it would be worthwhile to make this change in CI core, but you could easily create a MY_output.php library or hack _display() in output.php.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.