Author Topic: Mobile Javascript and HTML Design, Other Questions  (Read 4550 times)

0 Members and 1 Guest are viewing this topic.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Mobile Javascript and HTML Design, Other Questions
« on: August 15, 2011, 04:15:44 pm »
Does any of you know any guide on how to design programs that run well on mobile browsers? Thanks.

I'd also like to know how this kind of URL's work:

http://www.omgubuntu.co.uk/about/

The page has to have a file name, like about.php or about.html, so how do they hide the file name?

I thought that maybe they use Javascript to change the URL in the window, is that how they do it?

Thanks.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Mobile Javascript and HTML Design, Other Questions
« Reply #1 on: August 15, 2011, 04:20:28 pm »
Programs or webpages?
Either way, I'd be interested to know also.

It's probably a server-side thing -- you can configure servers so that file extensions are stripped off, or something.

(You can also place a 'index.html' file inside of a folder with the name you want, and typing in the url of that folder will redirect to the index file, but it doesn't feel like the prettiest solution to me.)

Edit: Hmm -- I have 888 posts...  Now, if only I had 88 respect...
« Last Edit: August 15, 2011, 04:21:23 pm by Michael_Lee »
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Mobile Javascript and HTML Design, Other Questions
« Reply #2 on: August 15, 2011, 05:09:33 pm »
Edit: Hmm -- I have 888 posts...  Now, if only I had 88 respect...
I can help with that >:D
Does any of you know any guide on how to design programs that run well on mobile browsers? Thanks.
http://www.webpagefx.com/design-build-mobile-web-site.html
I'd also like to know how this kind of URL's work:

http://www.omgubuntu.co.uk/about/

The page has to have a file name, like about.php or about.html, so how do they hide the file name?

I thought that maybe they use Javascript to change the URL in the window, is that how they do it?
Just name the file one of index.php, index.html, or index.htm and it'll show up as the default page for that directory.
« Last Edit: August 15, 2011, 05:11:35 pm by Deep Thought »




Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Mobile Javascript and HTML Design, Other Questions
« Reply #3 on: August 15, 2011, 05:17:32 pm »
You can also modify what page you want to use, IIRC.

Offline Anima

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 133
  • Rating: +4/-0
    • View Profile
Re: Mobile Javascript and HTML Design, Other Questions
« Reply #4 on: August 15, 2011, 05:46:07 pm »
I thought that maybe they use Javascript to change the URL in the window, is that how they do it?
No, i think they modify this with a .htaccess file.


Sorry for my bad English. I'm German.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Mobile Javascript and HTML Design, Other Questions
« Reply #5 on: August 15, 2011, 06:16:01 pm »
By default index.php, index.html, index.htm, default.php, default.html, and default.htm should be recognized as index. (If you're hosted on Juju's server, all of these work. No need to modify .htaccess.)




Offline flyingfisch

  • I'm 1337 now!
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1620
  • Rating: +94/-17
  • Testing, testing, 1...2...3...4...5...6...7...8..9
    • View Profile
    • Top Page Website Design
Re: Mobile Javascript and HTML Design, Other Questions
« Reply #6 on: August 30, 2011, 02:39:21 pm »
Use javascript or php to automatically choose the css for the screen size.

OR

Use a liquid layout.

OR

Make another page with a javascript redirect that redirects if sceen size is smaller than x.



Quote from: my dad
"welcome to the world of computers, where everything seems to be based on random number generators"



The Game V. 2.0

Offline Ikkerens

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 378
  • Rating: +28/-9
  • JavaScript Magician
    • View Profile
    • Walotech
Re: Mobile Javascript and HTML Design, Other Questions
« Reply #7 on: September 20, 2011, 05:42:46 am »
No, i think they modify this with a .htaccess file.

This is correct, Apache web servers have a mod named MOD_REWRITE ( http://httpd.apache.org/docs/2.0/misc/rewriteguide.html )
This allows urls such as http://www.example.com/page (without page being a folder)
or even: http://www.example.com/id/15/page/home/, which is then converted by apache to
Code: (php) [Select]
<?php

$_GET 
= Array(
"id" => 15,
"page" => "home"
);

?>


And as far as I know apache is the only server supporting this.
Unless you also count self-written servers in.
For example, I have written my own webserver for use in a game I'm currently developing, which uses:
http://localhost/JavaScript and http://localhost/CSS

<script src="JavaScript" type="text/javascript"></script> ftw

Splut for Android [----------]
Paused/halted indefinitely, might be abandoned, our graphic designer quit and the rest of us simply doesn't have the time to work on it...

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Mobile Javascript and HTML Design, Other Questions
« Reply #8 on: September 20, 2011, 09:33:40 am »
ephan was asking about displaying a page as a folder, and you can do that by naming it index.html, without modifying .htaccess. You can use .htaccess, of course, but remember every line you add slows down every request to your site a bit.
« Last Edit: September 20, 2011, 09:33:49 am by Deep Thought »




Offline Ikkerens

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 378
  • Rating: +28/-9
  • JavaScript Magician
    • View Profile
    • Walotech
Re: Mobile Javascript and HTML Design, Other Questions
« Reply #9 on: September 20, 2011, 10:27:17 am »
ephan was asking about displaying a page as a folder, and you can do that by naming it index.html, without modifying .htaccess. You can use .htaccess, of course, but remember every line you add slows down every request to your site a bit.
By making a folder containing index.html/php/htm you can, yeah, but it's ugly.
And .htaccess doesn't slow down the site that much. (1ms on an average webhost, max)
Because .htaccess is cached by apache.

Splut for Android [----------]
Paused/halted indefinitely, might be abandoned, our graphic designer quit and the rest of us simply doesn't have the time to work on it...