beta
Hello developer. Login with your existing account. New to Vodafone Developer? Register your account.

+ Login or create an account

0

I'm trying to get an XHTML Mobile Profile DTD page to compress using gzip.
Using PHP I have added two lines of code to .htaccess.


php_flag zlib.output_compression on
php_value zlib.output_compression_level 5

This works fine with Firefox and compresses by a third.

However there is no difference in the content size using Netfront 3.3 on a Sony Ericsson K610i via live.vodafone.com (Vodafone Live)

Is there something I should know?

Or should I just keep battling on?

Thanks for any help.

7 Answers:

0
Nice one - glad it all worked it out, and thanks for posting the answer for others' benefit :)
0
OK I nailed it!!! I researched the different data APN and found one that does not restrict or 'mother' the data connection. This has now dropped my data by a third. From 6KB on a document to 2KB So in summary: Vodafone does support gzip/deflate data to your mobile phone via nominated Vodafone gateways (APN). Data account APN www.vodafone.com does not forward compressed data to your phone. You'll need to select another. Netfront 3.3 on Sony Ericsson mobile phones does support data compression on non symbian phones.(SE K610iv tested) I hope this saves people some time in the future. Thanks Kevin and Vodafone for your support.
0
Another idea. If I create a compressed HTML document on the server as follows: compressed.html.gz 2KB compressed/6KB uncompressed. (1) If I view this file via Firefox I recieve the compressed document. (2) If I view the compressed document on a SE K610iv I can view the document, but the mobile phone counters record the UNCOMPRESSED file size. However the document has been uncompressed. Was it the phone or was it the vodafone gateway? (3) If I view the compressed document on a SE T610, again I can view the document. The mobile phones counters recording the uncompressed file size. Looking throught the white paper for the Sony Ericsson T610, there is no indication that it supports gzip/deflate compression. So can I assume the vodafone gateway has decompressed the document and forwarded the uncompressed document. (4) If I remove the HTTP accept-encoding from FireFox I get an uncompressed document which I CAN NOT view as I have no gzip/deflate encoding enabled. This implies a browser without the correct accept-encoding could not read the document. So, Is the Vodafone gateway decompressing/inflating the the document and forwarding the uncompressed data/document to the phone. Ideal for a device which can not decompress/deflate a document. BUT, for phones that can decompress/deflate the document itself.... that's a lot of extra data being sent to the phone. Could Vodafone confirm that they do pass gzip/deflate data to the phone without decompressing it at the Vodafone gateway. Thanks for you help and any info.
0
I'm still puzzled, but will ask a contact at SE and get back to you ASAP. Good luck in the meantime!
0
Another idea. I converted my document to cHTML (text/html) instead of using XHTML-MP (application/xhtml+xml) The document sizes of both cHTML and XHTML are almost the same as seen on the mobile phone counters. This would imply that the XHTML DTD is placing NO over-head on the data being sent to the mobile phone. The size of the UNCOMPRESSED document is similar on both FireFox (6502B) and Netfront (7222B) Compressed and viewed in FireFox the document size is reduced to 2895B However compressing these documents shows NO difference for both document types on the mobile phone (SE K610iv) using NetFront v3.3 This begs the question can Netfront V3.3 on a non Symbian phone compress HTML documents using gzip (even though it indicates it can) and if so, how does the Vodafone gateway see this data. Any ideas.
0
I'm pretty sure it's NetFront 3.3 as that's currently what almost all Sony Ericsson mid to high end mobile phones currently run (04-OCT-2007) which are not running the Symbian OS. I don't believe NetFront 3.2 supported compression, but could be wrong. I've written an ECMAScript(JavaScript) on the SE K610iv mobile (Vodafone model) and it reports NetFront 3.3, it's in the UAProf document and it's in the User-Agent. Think Sony Ericsson started out using NetFront 3.3 and as yet have not started using NetFront 3.4 unless it's a phone released 'yesterday' like say the Sony Ericsson V640. The phone was purchased new from Vodafone New Zealand and is being used from their. I'm not in the UK, but hopefully the question is the same. I'm developing from an ISP and don't have access to a lot of the tools to debug the connection. I can't get a strait answer out of ACCESS co. as they will not answer Sony Ericsson related NetFront questions due to contractual agreements with Sony Ericsson. And the Sony Ercissons forum is a bit of a grave yard for questions. I have thought about writing a small J2ME app. and see if I can test it that way. Thought I'd try the easy path first. :-) The Sony Ericsson K610iv Header reports the following: ACCEPT: multipart/mixed, application/vnd.wap.multipart.mixed, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml, */*, text/x-vcard, text/x-vcalendar, image/gif, image/vnd.wap.wbmp ACCEPT-CHARSET: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS, Big5 ACCEPT-ENCODING: deflate, gzip ACCEPT-LANGUAGE: en CONTENT-LENGTH: 0 HOST: vulpine.mobi USER-AGENT: SonyEricssonK610iv/R6BC Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1 VIA: WTP/1.1 Vodafone wap3FTC (Nokia WAP Gateway 4.1/CD13/4.1.89), 1.1 vlsp1:9010 (squid/2.5.STABLE10) X-FORWARDED-FOR: 172.27.71.133 X-NETWORK-INFO: GPRS,XXXXXXXXXXXX,unsecured X-NOKIA-BEARER: GPRS X-NOKIA-CONNECTION_MODE: TCP X-NOKIA-GATEWAY-ID: NWG/4.1/Build89 X-NOKIA-MSISDN: XXXXXXXXXXXX X-WAP-PROFILE: "http://wap.sonyericsson.com/UAprof/K610iR201-3G.xml" Address: 202.73.206.32 Port: 25923 Method: GET So it does indicate it supports compression encoding. And just to be clear. I'm just viewing a standard XHTML-MP web page. Nothing fancy. Also without further information I'm assuming that gzip on NetFront v3.3 extends to HTML web pages and not just file transfers.
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Compression Test</title>
<meta name="description" content="Simple page for compression test" />
</head>
<body>
<p>
Just include war and peace or Freud's psychoanalytic thoery as page content.
</p>
</body>
</html>
Thanks for any help.
0
Hi there, Possible that the live gateway is inflating the DTD, can you confirm that the DTD is leaving your server as a zip when a request is made from the K6101i? Also please can you confirm that it's V3.3, as I can only find specs for 3.3 on S60 and Pocket PC. And please could someone from VF UK confirm if the live gateway (or WTE) would inflate a compressed DTD before sending it on? Cheers Kevin

Login and answer the question