<JCaesar> Eh, why is the doc index an iframe and not the content? The other way around you would save quite some data reloading plus you'd keep the scroll position.
<JCaesar> :/
<Guenther> JCaesar: So that you can easily copy the URL
<JCaesar> Hm, okay.
<Guenther> Feel free to add some javascript to replace the reloading with AJAX and history API
<JCaesar> Nah. I#ve already done stuff like that for own pages. It's a pain.
Turns out, it only takes about 29 lines of Javascript for a basic implementation. Also supporting the inpage-links would take a bit more, but not much. This shouldn't change anything in browsers not supporting the history.pushState API, but I've only tested it in Firefox 12 and I don't whether and how interoperable other browsers implemented that API.
<JCaesar> :/
<Guenther> JCaesar: So that you can easily copy the URL
<JCaesar> Hm, okay.
<Guenther> Feel free to add some javascript to replace the reloading with AJAX and history API
<JCaesar> Nah. I#ve already done stuff like that for own pages. It's a pain.
Turns out, it only takes about 29 lines of Javascript for a basic implementation. Also supporting the inpage-links would take a bit more, but not much. This shouldn't change anything in browsers not supporting the history.pushState API, but I've only tested it in Firefox 12 and I don't whether and how interoperable other browsers implemented that API.
Attachment: 0001-docs-Use-javascript-to-avoid-page-reloads-when-using.patch - docs: Use javascript to avoid page reloads when using the toc (4k)
Stuff like
finally got unnecessary?
if (window.XMLHttpRequest)
return new XMLHttpRequest();
else if(window.ActiveXObject)
return new ActiveXObject("Microsoft.XMLHTTP");
finally got unnecessary?
btw who uses IE6?
this is a security risk, because you can push an elephant through the gaps without noticing.
and a lot of webservices have sentences like "Any older version might not work. The solution is to UPGRADE!"
this is a security risk, because you can push an elephant through the gaps without noticing.
and a lot of webservices have sentences like "Any older version might not work. The solution is to UPGRADE!"
IE actually does, as of version 10 (http://blogs.msdn.com/b/ie/archive/2011/10/31/html5-history-in-ie10.aspx).
Edit: You could btw usally just emulate this behaviour with the hashsign-appendix.
Edit: You could btw usally just emulate this behaviour with the hashsign-appendix.
> IE actually does, as of version 10
Which also supports
new XMLHttpRequest
.> You could btw usally just emulate this behaviour with the hashsign-appendix.
We're already using those for their intended purpose, and I'd like to keep the URLs and page-load times when navigating to them from elsewhere short.
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill