# P5.js web editor vs gitpages - same code, different behavior

**URL:** <https://discourse.processing.org/t/p5-js-web-editor-vs-gitpages-same-code-different-behavior/42236>\
**Category:** p5.js\
**Created:** [June 17, 2023, 1:56pm UTC](https://discourse.processing.org/t/p5-js-web-editor-vs-gitpages-same-code-different-behavior/42236 "2023-06-17T13:56:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nsegal](https://avatars.discourse-cdn.com/v4/letter/n/8491ac/32.png) [@nsegal](https://discourse.processing.org/u/nsegal)\
**Post date:** [June 17, 2023, 1:56pm UTC](https://discourse.processing.org/t/p5-js-web-editor-vs-gitpages-same-code-different-behavior/42236/1 "2023-06-17T13:56:06Z")

</div>

Using the p5 web editor I made a web app to run on the browser of a smart phone. I think made a git repo and copied all the code to the repo and hosted it on gitpages. The html, css, and sketch.js are the same, but when I go to the git-pages site on my phone, the resolution is much smaller than when I go to the site hosted by p5 web editor.  
[git-pages version](https://nhsegal.github.io/iAccelerometer/)  
[p5 web editor version](https://editor.p5js.org/nsegal/full/GCMv0poqd)  
(The app only runs on mobile, so once you open the link, have the browser make a QR to share it with the phone.)  
It feels similar to issues I’ve faced using the canvas html element and handling device-pixel ratios, but here it’s the same device each time and same code, so I’m at a loss.

---

<div class="post-metadata">

**Author:** ![nsegal](https://avatars.discourse-cdn.com/v4/letter/n/8491ac/32.png) [@nsegal](https://discourse.processing.org/u/nsegal)\
**Post date:** [June 17, 2023, 11:39pm UTC](https://discourse.processing.org/t/p5-js-web-editor-vs-gitpages-same-code-different-behavior/42236/2 "2023-06-17T23:39:40Z")

</div>

In the index.html file changing the meta tag from

```auto
 <meta name="viewport" content="width=device-width, initial-scale=1">

```

to

```auto
  <meta name="viewport" content="width=320px, initial-scale=1">

```

seemed to work, but I would still appreciate insights about why this wasn’t necessary for p5 web editor.
