Jon, TimS suggested we use this approach, because we don't have ESI, and we need to inject a Zero banner which is client IP dependent, without varying article's HTML.

See this RFC for details on why we do it and how.

Gautam, the code is, as always, fully open source :)  See the this RFC (banner generation) first and also here's the Repository, code that generates <script> & <noscript>, and this code outputs the actual javascript.

Thanks!


On Mon, Jul 28, 2014 at 11:14 PM, Jon Robson <jdlrobson@gmail.com> wrote:
Also don't use document.write :)
Out of interest what is this document.write code needed for?



On Mon, Jul 28, 2014 at 12:09 PM, Gautam Chandna <gautamc@opera.com> wrote:
> Opera mini doesn't support inlined scripts, as it needs to finish processing
> the page as fast as possible for transcoding.
>
> The session/cookies/dom/etc all sits on the server while the client simply
> sees the rendered page. To make this possible, we have to give up on a lot
> of scripted functionality.
>
> It does execute the onload event for upto 5 seconds, so you could try using
> that. If you're open to sharing your code, I could try and help.
>
> Best regards,
> Gautam Chandna
> +47 4567 1789
> Sent from my iPhone
>
> On 28 Jul 2014, at 20:45, Yuri Astrakhan <yastrakhan@wikimedia.org> wrote:
>
> Hi, I'm running into an opera mini strangeness. I have a <script src="...">
> tag inside <body>, which is suppose to return document.write("some HTML");
> This works fine except on opera mini, which does not seem to even call the
> server, because I looked at server:source and saw the unsubstituted <script>
> tag.  Any suggestions?
>
> _______________________________________________
> Mobile-l mailing list
> Mobile-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mobile-l
>
>
> _______________________________________________
> Mobile-l mailing list
> Mobile-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mobile-l
>



--
Jon Robson
* http://jonrobson.me.uk
* https://www.facebook.com/jonrobson
* @rakugojon

_______________________________________________
Mobile-l mailing list
Mobile-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mobile-l