Loading ...
Sorry, an error occurred while loading the content.

Re: [wmlprogramming] Re: css issue

Expand Messages
  • Luca Passani
    Some random thoughts about CSS in mobile: - placing them inline is usually a good idea (people will perceive that the page loads faster) - beware of
    Message 1 of 14 , Dec 27, 2007
    View Source
    • 0 Attachment
      Some random thoughts about CSS in mobile:

      - placing them inline is usually a good idea (people will perceive that
      the page loads faster)
      - beware of width:100%. It has caused me great grief in the oast (even
      with high end phones)
      - have you tried something like:

      href="/site/css.asp?css=seabluePC.css"

      where you leave it to css.asp to figure out that the ".css" part should
      simply be discarded?

      Luca

      mobivid wrote:
      > yes some nokia and motorola cousing problems.
      >
      > it works fine when i put css content in actual page but then pohone
      > wont cache css and will reload everytime which means more money
      >
      >
      > --- In wmlprogramming@yahoogroups.com, Max Rozanoff
      > <perpetum.mobile@...> wrote:
      >
      >> Hi
      >> I can bet 5 dollars that you have problems with some of Nokia
      >>
      > phones :)
      >
      >> In fact I think that it can happens cause of:
      >> 1 Phones see asp extension in you css file name and have no idea
      >>
      > what to
      >
      >> do (In my experience nokia phones dont care about content-type
      >>
      > header
      >
      >> and check file extension)
      >> 2 Maybe some phones can get style files with GET parameters
      >>
      >> So I can offer you to use mod_rewrite (this is apache module but
      >>
      > IIS
      >
      >> should have something simular) to store GET parameters into URL
      >> like this:
      >> /seabluePC/site/style.css
      >>
      >> Regards
      >> Max
      >>
      >>
    • mobivid
      i used 100% in web version of css. i should have given mobile version of it as example. I have solved the problem with url rewrite . one more thing, aperantly
      Message 2 of 14 , Dec 27, 2007
      View Source
      • 0 Attachment
        i used 100% in web version of css. i should have given mobile version
        of it as example.

        I have solved the problem with url rewrite .

        one more thing, aperantly some phones would not parse css if css is
        on one line

        i.e :

        img{border:0px;vertical-align:middle;} body {margin-top : 0;margin-
        left : 0;margin-right : 0;text-align








        --- In wmlprogramming@yahoogroups.com, Luca Passani <passani@...>
        wrote:
        >
        >
        > Some random thoughts about CSS in mobile:
        >
        > - placing them inline is usually a good idea (people will perceive
        that
        > the page loads faster)
        > - beware of width:100%. It has caused me great grief in the oast
        (even
        > with high end phones)
        > - have you tried something like:
        >
        > href="/site/css.asp?css=seabluePC.css"
        >
        > where you leave it to css.asp to figure out that the ".css" part
        should
        > simply be discarded?
        >
        > Luca
        >
        > mobivid wrote:
        > > yes some nokia and motorola cousing problems.
        > >
        > > it works fine when i put css content in actual page but then
        pohone
        > > wont cache css and will reload everytime which means more money
        > >
        > >
        > > --- In wmlprogramming@yahoogroups.com, Max Rozanoff
        > > <perpetum.mobile@> wrote:
        > >
        > >> Hi
        > >> I can bet 5 dollars that you have problems with some of Nokia
        > >>
        > > phones :)
        > >
        > >> In fact I think that it can happens cause of:
        > >> 1 Phones see asp extension in you css file name and have no idea
        > >>
        > > what to
        > >
        > >> do (In my experience nokia phones dont care about content-type
        > >>
        > > header
        > >
        > >> and check file extension)
        > >> 2 Maybe some phones can get style files with GET parameters
        > >>
        > >> So I can offer you to use mod_rewrite (this is apache module but
        > >>
        > > IIS
        > >
        > >> should have something simular) to store GET parameters into URL
        > >> like this:
        > >> /seabluePC/site/style.css
        > >>
        > >> Regards
        > >> Max
        > >>
        > >>
        >
      • Michael Schwarz
        Hi, ... type= text/css / ... Only because quite a few Browsers would only understand sominething actually ending on .css - like:
        Message 3 of 14 , Dec 28, 2007
        View Source
        • 0 Attachment
          Hi,

          > Michael, why
          > <link rel="stylesheet" href="/site/css.asp?css=seabluePC"
          type="text/css"/>>
          > wouldn't work?

          Only because quite a few Browsers would only understand sominething
          actually ending on ".css" - like:
          <link rel="stylesheet" href="/site/seabluePC.css" type="text/css"/>
          At least that was my experience so far.

          But I've seen, you've now
          placed your styles within the head of the document
          (<style type="text/css"> ... ) - which is propably "better" anyways.

          Michael

          --
          Michael Schwarz
          Web Freelancer - Berlin
          http://www.michaelschwarz.net/
          http://www.mobilewebdesign.de/
        • mobivid
          sfirst i used url rewrite but even that wouldn;t work for some browsers so i have placed css code in to page itself. it has one bad side though. it wont be
          Message 4 of 14 , Dec 28, 2007
          View Source
          • 0 Attachment
            sfirst i used url rewrite but even that wouldn;t work for some
            browsers so i have placed css code in to page itself. it has one bad
            side though. it wont be cached so one more query to my db server

            --- In wmlprogramming@yahoogroups.com, Michael Schwarz <groups@...>
            wrote:
            >
            > Hi,
            >
            > > Michael, why
            > > <link rel="stylesheet" href="/site/css.asp?css=seabluePC"
            > type="text/css"/>>
            > > wouldn't work?
            >
            > Only because quite a few Browsers would only understand sominething
            > actually ending on ".css" - like:
            > <link rel="stylesheet" href="/site/seabluePC.css" type="text/css"/>
            > At least that was my experience so far.
            >
            > But I've seen, you've now
            > placed your styles within the head of the document
            > (<style type="text/css"> ... ) - which is propably "better" anyways.
            >
            > Michael
            >
            > --
            > Michael Schwarz
            > Web Freelancer - Berlin
            > http://www.michaelschwarz.net/
            > http://www.mobilewebdesign.de/
            >
          • Miha Valencic
            Mobivid, this answer is a bit late in the game :), but: use pathInfo instead of QueryString, so your URL can look like /files/UserCss.aspx/UserID/style.css and
            Message 5 of 14 , Dec 28, 2007
            View Source
            • 0 Attachment
              Mobivid,

              this answer is a bit late in the game :), but:

              use pathInfo instead of QueryString, so your URL can look like
              /files/UserCss.aspx/UserID/style.css and you can parse this string and
              retrieve the userid from it.

              As others noted, it is sometimes better to embed css in the page itself.
              Yes, all the pages will be longer, but there will only be one request.
              Mobile phones have a high latency (time to first byte) so this improves
              "perceived" speed.

              And if you go that route, you can always cache that in your application. You
              should (must!) not hit the DB for every query. Caching is one of the most
              underused (unused?) features in most frameworks.

              Miha

              On Dec 28, 2007 6:24 PM, mobivid <copluk@...> wrote:

              > sfirst i used url rewrite but even that wouldn;t work for some
              > browsers so i have placed css code in to page itself. it has one bad
              > side though. it wont be cached so one more query to my db server
              >
              >


              [Non-text portions of this message have been removed]
            • mobivid
              Unfortunately i use classic asp i have to rely on db connection ... and ... itself. ... request. ... improves ... application. You ... the most ... bad
              Message 6 of 14 , Dec 28, 2007
              View Source
              • 0 Attachment
                Unfortunately i use classic asp i have to rely on db connection


                --- In wmlprogramming@yahoogroups.com, "Miha Valencic"
                <miha.valencic@...> wrote:
                >
                > Mobivid,
                >
                > this answer is a bit late in the game :), but:
                >
                > use pathInfo instead of QueryString, so your URL can look like
                > /files/UserCss.aspx/UserID/style.css and you can parse this string
                and
                > retrieve the userid from it.
                >
                > As others noted, it is sometimes better to embed css in the page
                itself.
                > Yes, all the pages will be longer, but there will only be one
                request.
                > Mobile phones have a high latency (time to first byte) so this
                improves
                > "perceived" speed.
                >
                > And if you go that route, you can always cache that in your
                application. You
                > should (must!) not hit the DB for every query. Caching is one of
                the most
                > underused (unused?) features in most frameworks.
                >
                > Miha
                >
                > On Dec 28, 2007 6:24 PM, mobivid <copluk@...> wrote:
                >
                > > sfirst i used url rewrite but even that wouldn;t work for some
                > > browsers so i have placed css code in to page itself. it has one
                bad
                > > side though. it wont be cached so one more query to my db server
                > >
                > >
                >
                >
                > [Non-text portions of this message have been removed]
                >
              • Miha Valencic
                You can use cache in classic ASP as well. ... [Non-text portions of this message have been removed]
                Message 7 of 14 , Dec 28, 2007
                View Source
                • 0 Attachment
                  You can use cache in classic ASP as well.

                  On Dec 28, 2007 8:46 PM, mobivid <copluk@...> wrote:

                  > Unfortunately i use classic asp i have to rely on db connection
                  >
                  >


                  [Non-text portions of this message have been removed]
                • mobivid
                  also i know its possible to cache data in asp with global asa but the system i have designed uses different css theme for every site or and user.so for example
                  Message 8 of 14 , Dec 28, 2007
                  View Source
                  • 0 Attachment
                    also i know its possible to cache data in asp with global asa but the
                    system i have designed uses different css theme for every site or and
                    user.so for example


                    http://thistlewap.mobile.web.tr

                    uses another css

                    http://lovegeneration.mobile.web.tr/

                    another.

                    they are subdomains but in reality they are

                    http://mobile.web.tr/site/default.asp?site=lovegeneration
                    and
                    http://mobile.web.tr/site/default.asp?site=thistlewap


                    when i use global.asa it threats them as same application.

                    if it was asp.net site maybe i would be able to do it (i am not sure
                    how caching works on asp.net)


                    --- In wmlprogramming@yahoogroups.com, "Miha Valencic"
                    <miha.valencic@...> wrote:
                    >
                    > Mobivid,
                    >
                    > this answer is a bit late in the game :), but:
                    >
                    > use pathInfo instead of QueryString, so your URL can look like
                    > /files/UserCss.aspx/UserID/style.css and you can parse this string
                    and
                    > retrieve the userid from it.
                    >
                    > As others noted, it is sometimes better to embed css in the page
                    itself.
                    > Yes, all the pages will be longer, but there will only be one
                    request.
                    > Mobile phones have a high latency (time to first byte) so this
                    improves
                    > "perceived" speed.
                    >
                    > And if you go that route, you can always cache that in your
                    application. You
                    > should (must!) not hit the DB for every query. Caching is one of
                    the most
                    > underused (unused?) features in most frameworks.
                    >
                    > Miha
                    >
                    > On Dec 28, 2007 6:24 PM, mobivid <copluk@...> wrote:
                    >
                    > > sfirst i used url rewrite but even that wouldn;t work for some
                    > > browsers so i have placed css code in to page itself. it has one
                    bad
                    > > side though. it wont be cached so one more query to my db server
                    > >
                    > >
                    >
                    >
                    > [Non-text portions of this message have been removed]
                    >
                  Your message has been successfully submitted and would be delivered to recipients shortly.